コード例 #1
0
ファイル: AbstractComposite.php プロジェクト: aiesh/magento2
 /**
  * Check whether element is visible
  *
  * @return bool
  */
 public function isVisible()
 {
     if (parent::isVisible()) {
         return $this->hasChildren() || $this->getFrontendModel();
     }
     return false;
 }
コード例 #2
0
 /**
  * @param array $settings
  * @param string $scope
  * @dataProvider isVisibleReturnsFalseForNonProperScopesDataProvider
  */
 public function testIsVisibleReturnsFalseForNonProperScopes($settings, $scope)
 {
     $this->_model->setData($settings, $scope);
     $this->assertFalse($this->_model->isVisible());
 }