Beispiel #1
0
 /**
  * Get page properties
  *
  * Lists all the properties of a page in an array so it can be compared to other
  * pages and accross cycles
  *
  * @return array
  */
 public function listProperties()
 {
     $properties = array();
     $arr = array('title', 'name', 'min', 'max', 'weight', 'instructions', 'leadingText', 'trailingText');
     foreach ($arr as $name) {
         $func = 'get' . ucfirst($name);
         $properties[$name] = $this->_applicationPage->{$func}();
     }
     if ($this->_applicationPage->isRequired()) {
         $properties['isRequired'] = true;
     } else {
         $properties['isRequired'] = false;
     }
     if ($this->_applicationPage->showAnswerStatus()) {
         $properties['answerStatusDisplay'] = true;
     } else {
         $properties['answerStatusDisplay'] = false;
     }
     $properties['variables'] = array();
     foreach ($this->_applicationPage->getPage()->getVariables() as $var) {
         $properties['variables'][$var->getName()] = $var->getValue();
     }
     $properties['elements'] = array();
     foreach ($this->_applicationPage->getPage()->getElements() as $element) {
         $properties['elements'][$element->getTitle()] = $element->getJazzeeElement()->listProperties();
     }
     return $properties;
 }