예제 #1
0
파일: Branching.php 프로젝트: Jazzee/Jazzee
 /**
  * Get the display value for a display element
  * @param array $answerArray
  * @param \Jazzee\Interfaces\DisplayElement $displayElement
  * @return string
  */
 public function getDisplayElementValueFromArray(array $answerArray, \Jazzee\Interfaces\DisplayElement $displayElement)
 {
     if ($displayElement->getType() == 'page' and $displayElement->getName() == 'branchingPageSelection' and $displayElement->getPageId() == $this->_applicationPage->getPage()->getId()) {
         return $answerArray['elements'][0]['values'][0]['value'];
     }
     if (empty($answerArray['children'][0])) {
         return '';
     }
     return parent::getDisplayElementValueFromArray($answerArray['children'][0], $displayElement);
 }