Exemplo n.º 1
0
 /**
  * Filter Expression Actions for given action
  *
  * @param array $expressionActions Array of Expression Actions to be filtered
  * @param String $action name of the action ("edit", "view", "save", ...)
  *
  * @return array Allowed Expression Actions for given action
  */
 protected static function filterActionsForView($expressionActions, $action)
 {
     $allowedActions = array();
     foreach ($expressionActions as $expressionAction) {
         $tempAction = ActionFactory::getNewAction($expressionAction['name'], $expressionAction['params']);
         if (!empty($tempAction) && $tempAction->isActionAllowed($action)) {
             $allowedActions[] = $expressionAction;
         }
     }
     return $allowedActions;
 }