Skip to content
Snippets Groups Projects

SNZ-273 Added CMS UI for adding multiple display rules

Merged Michael Strong requested to merge SNZ-273 into master
4 unresolved threads

Merge request reports

Merged by (May 16, 2025 1:48pm UTC)

Merge details

  • Changes merged into with 8fef32e8.
  • Deleted the source branch.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
71
72 return $title;
73 }
74
75 public function getName()
76 {
77 return $this->Field() ? $this->Field()->Name : '';
78 }
79
80 /**
81 * @return array - array of field name => title
82 */
83 protected function getQuestions()
84 {
85 if(!$this->Parent()) {
86 $currentPage = Session::get('CMSMain.currentPage');
  • 43 $definition = [
    44 'name' => $this->getName(),
    45 'values' => $this->Values,
    46 ];
    47
    48 $this->extend('updateFieldDefinition', $definition);
    49
    50 // If either name or value is empty then we return an empty array
    51 if(empty($definition['name']) || empty($definition['values'])) {
    52 return [];
    53 }
    54
    55 return $definition;
    56 }
    57
    58 public function getFieldTitle($field = null)
  • 1 <?php
    2
    3 /**
    4 * Records which represents an individual display rule.
    5 */
    6 class UserSurveysDisplayRule extends DataObject implements UserSurveysFormField
    7 {
    8 private static $db = [
    9 'Values' => 'Text',
    10 ];
    11
    12 private static $has_one = [
    13 'Field' => 'EditableFormField',
  • 1 <?php
    2
    3 /**
    4 * Records which represents an individual display rule.
    5 */
    6 class UserSurveysDisplayRule extends DataObject implements UserSurveysFormField
  • Michael Strong mentioned in commit 8fef32e8

    mentioned in commit 8fef32e8

  • Please register or sign in to reply