/** * Check whether element is visible * * @return bool */ public function isVisible() { if (parent::isVisible()) { return $this->hasChildren() || $this->getFrontendModel(); } return false; }
/** * @param array $settings * @param string $scope * @dataProvider isVisibleReturnsFalseForNonProperScopesDataProvider */ public function testIsVisibleReturnsFalseForNonProperScopes($settings, $scope) { $this->_model->setData($settings, $scope); $this->assertFalse($this->_model->isVisible()); }