Example #1
0
 /**
  * Check whether element is visible
  *
  * @return bool
  */
 public function isVisible()
 {
     if (parent::isVisible()) {
         return $this->hasChildren() || $this->getFrontendModel();
     }
     return false;
 }
Example #2
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;
 }
Example #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_'));
 }
Example #4
0
 /**
  * Initialize current flyweight
  *
  * @param array $element
  */
 protected function _initFlyweight(array $element)
 {
     $this->_flyweight->setData($element, $this->_scope);
 }