Esempio n. 1
0
 /**
  * Check whether element is visible
  *
  * @return bool
  */
 public function isVisible()
 {
     if (parent::isVisible()) {
         return $this->hasChildren() || $this->getFrontendModel();
     }
     return false;
 }
Esempio n. 2
0
 /**
  * Initialize current flyweight
  *
  * @param array $element
  * @return void
  */
 protected function _initFlyweight(array $element)
 {
     $this->_flyweight->setData($element, $this->_scope);
 }
Esempio n. 3
0
 public function testGetPathBuildsFullPath()
 {
     $this->_model->setData(array('path' => 'section/group', 'id' => 'fieldId'), 'scope');
     $this->assertEquals('section/group/prefix_fieldId', $this->_model->getPath('prefix_'));
 }
Esempio n. 4
0
 /**
  * Retrieve comment
  *
  * @param string $currentValue
  * @return string
  */
 public function getComment($currentValue = '')
 {
     $comment = '';
     if (isset($this->_data['comment'])) {
         if (is_array($this->_data['comment'])) {
             if (isset($this->_data['comment']['model'])) {
                 $model = $this->_commentFactory->create($this->_data['comment']['model']);
                 $comment = $model->getCommentText($currentValue);
             }
         } else {
             $comment = parent::getComment();
         }
     }
     return $comment;
 }