/**
  *
  * @return string
  */
 function __toString()
 {
     // Section fieldset
     $jFormSectionDiv = new JFormElement('div', array('id' => $this->id, 'class' => $this->class));
     // This causes issues with things that are dependent and should display by default
     // If the section has dependencies and the display type is hidden, hide by default
     //if($this->dependencyOptions !== null && isset($this->dependencyOptions['display']) && $this->dependencyOptions['display'] == 'hide') {
     //    $jFormSectionDiv->setAttribute('style', 'display: none;');
     //}
     // Set the style
     if (!empty($this->style)) {
         $jFormSectionDiv->addToAttribute('style', $this->style);
     }
     // Add a title to the page
     if (!empty($this->title)) {
         $title = new JFormElement('div', array('class' => $this->titleClass));
         $title->update($this->title);
         $jFormSectionDiv->insert($title);
     }
     // Add a description to the page
     if (!empty($this->description)) {
         $description = new JFormElement('div', array('class' => $this->descriptionClass));
         $description->update($this->description);
         $jFormSectionDiv->insert($description);
     }
     // Add the form sections to the page
     foreach ($this->jFormComponentArray as $jFormComponentArray) {
         $jFormSectionDiv->insert($jFormComponentArray);
     }
     return $jFormSectionDiv->__toString();
 }
Пример #2
0
 /**
  *
  * @return string
  */
 function __toString()
 {
     // Page div
     $jFormPageDiv = new JFormElement('div', array('id' => $this->id, 'class' => $this->class));
     // Set the styile
     if (!empty($this->style)) {
         $jFormPageDiv->addToAttribute('style', $this->style);
     }
     // Add a title to the page
     if (!empty($this->title)) {
         $title = new JFormElement('div', array('class' => $this->titleClass));
         $title->update($this->title);
         $jFormPageDiv->insert($title);
     }
     // Add a description to the page
     if (!empty($this->description)) {
         $description = new JFormElement('div', array('class' => $this->descriptionClass));
         $description->update($this->description);
         $jFormPageDiv->insert($description);
     }
     // Add the form sections to the page
     foreach ($this->jFormSectionArray as $jFormSection) {
         $jFormPageDiv->insert($jFormSection);
     }
     // Submit instructions
     if (!empty($this->submitInstructions)) {
         $submitInstruction = new JFormElement('div', array('class' => $this->submitInstructionsClass));
         $submitInstruction->update($this->submitInstructions);
         $jFormPageDiv->insert($submitInstruction);
     }
     return $jFormPageDiv->__toString();
 }