/** * Check whether element is visible * * @return bool */ public function isVisible() { if (parent::isVisible()) { return $this->hasChildren() || $this->getFrontendModel(); } return false; }
/** * Initialize current flyweight * * @param array $element * @return void */ protected function _initFlyweight(array $element) { $this->_flyweight->setData($element, $this->_scope); }
public function testGetPathBuildsFullPath() { $this->_model->setData(array('path' => 'section/group', 'id' => 'fieldId'), 'scope'); $this->assertEquals('section/group/prefix_fieldId', $this->_model->getPath('prefix_')); }
/** * 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; }