public function ID()
 {
     $id = $this->appendType ? $this->name . '-' . $this->appendType : $this->name;
     if ($this->holder) {
         return $this->holder->ID() . '_' . $id;
     }
     return $this->form ? $this->form->FormName() . '_' . $id : $id;
 }
 public function Field($properties = array())
 {
     if ($this->firstActive) {
         $this->makeFirstActive();
     }
     $properties['endCarousel'] = true;
     $properties['outerCarouselNavigation'] = true;
     $properties['carouselNavigationClasses'] = 'carousel-static';
     if (!isset($properties['startCarousel'])) {
         $properties['startCarousel'] = $this->ID();
     }
     if (!isset($properties['carouselParentAttributes'])) {
         $properties['carouselParentAttributes'] = $this->JSONAttributesHTML;
     }
     if (!isset($properties['slides'])) {
         $properties['slides'] = $this->children;
     }
     if (!isset($properties['carouselNavigation']) && $this->children && $this->children->exists()) {
         $properties['carouselName'] = $this->ID();
         $properties['carouselNavigation'] = ArrayList::create();
         foreach ($this->children as $child) {
             $properties['carouselNavigation']->push(ArrayData::create(array('carouselTitle' => $child->Title(), 'carouselActive' => $child->isActive(), 'carouselName' => $this->ID())));
         }
     }
     return parent::Field($properties);
 }
 public function Field($properties = array())
 {
     $properties['endAccordion'] = true;
     if (!isset($properties['startAccordion'])) {
         $properties['startAccordion'] = $this->ID();
     }
     if (!isset($properties['accordionParentAttributes'])) {
         $properties['accordionParentAttributes'] = $this->JSONAttributesHTML;
     }
     if (!isset($properties['accordions'])) {
         $properties['accordions'] = $this->children;
     }
     return parent::Field($properties);
 }
 public function Field($properties = array())
 {
     if (!isset($properties['panelAttributes'])) {
         $properties['panelAttributes'] = $this->JSONAttributesHTML;
     }
     if (!isset($properties['panelFields'])) {
         $properties['panelFields'] = $this->children;
     }
     if (!isset($properties['panelHeading']) && ($title = trim($this->Title()))) {
         $properties['panelHeading'] = $title;
     }
     if (!isset($properties['panelName'])) {
         $properties['panelName'] = $this->ID();
     }
     return parent::Field($properties);
 }
 public function Field($properties = array())
 {
     if ($this->firstActive) {
         $this->makeFirstActive();
     }
     $properties['endTabs'] = true;
     if (!isset($properties['startTabs'])) {
         $properties['startTabs'] = $this->ID();
     }
     if (!isset($properties['tabParentAttributes'])) {
         $properties['tabParentAttributes'] = $this->JSONAttributesHTML;
     }
     if (!isset($properties['tabs'])) {
         $properties['tabs'] = $this->children;
     }
     if (!isset($properties['tabNavigation']) && $this->children && $this->children->exists()) {
         $properties['tabNavigation'] = ArrayList::create();
         foreach ($this->children as $child) {
             $properties['tabNavigation']->push(ArrayData::create(array('tabActive' => $child->isActive(), 'tabName' => $child->ID(), 'tabTitle' => $child->Title())));
         }
     }
     return parent::Field($properties);
 }
 public function Field($properties = array())
 {
     if (!isset($properties['ID'])) {
         $properties['ID'] = $this->ID();
     }
     if (!isset($properties['Title']) && $this->Title()) {
         $properties['Title'] = $this->Title();
     }
     if (!isset($properties['AttributesHTML'])) {
         $properties['AttributesHTML'] = $this->AttributesHTML;
     }
     if (!isset($properties['NoClose']) && !$this->allowClose) {
         $properties['NoClose'] = true;
     }
     if ((!isset($properties['Trigger']) || isset($properties['TriggerButton'])) && $this->modalTrigger) {
         if ($this->modalTrigger instanceof FormActionLink) {
             $this->modalTrigger->triggerModal($this->ID());
         }
         if ($this->modalTrigger instanceof FormField) {
             $properties['TriggerButton'] = $this->modalTrigger;
         } else {
             $properties['Trigger'] = $this->modalTrigger;
         }
     }
     if (!isset($properties['FieldList']) && $this->children) {
         $properties['FieldList'] = $this->children;
     }
     if (!isset($properties['FooterFields']) && $this->footer) {
         $properties['FooterFields'] = $this->footer;
     }
     return parent::FieldHolder($properties);
 }