Ejemplo n.º 1
0
 /**
  * @param ActionElement $element
  * @param array $elementInformation
  * @return bool
  */
 protected function shouldRenderToolBarElement($element, $elementInformation)
 {
     assert('$element instanceof ActionElement');
     assert('is_array($elementInformation)');
     if (!parent::shouldRenderToolBarElement($element, $elementInformation)) {
         return false;
     }
     return ActionSecurityUtil::canCurrentUserPerformAction($element->getActionType(), $this->model);
 }
 protected function shouldRenderToolBarElement($element, $elementInformation)
 {
     assert('$element instanceof ActionElement');
     assert('is_array($elementInformation)');
     if (!parent::shouldRenderToolBarElement($element, $elementInformation)) {
         return false;
     }
     if (!isset($elementInformation['renderType']) || isset($elementInformation['renderType']) && $elementInformation['renderType'] == $this->renderType) {
         return true;
     }
     return false;
 }