public function getByName($name, $global = false)
    {
        $actions = $global ? $this->getGlobalActions() : $this->getActions();

        //loop over the actions to find our culprit
        foreach ($actions as $action) {
            if ($action->getOption('action_name') === $name) {
                return $action;
            }
        }

        return false;
    }
public function getByName($name, $global = false)
    {
        $actions = $global ? $this->getGlobalActions() : $this->getActions();

        //loop over the actions to find our culprit
        foreach ($actions as $action) {
            if ($action->getOption('action_name') === $name) {
                return $action;
            }
        }

        return false;
    }
public function getByName ( $ name , $ global = false ) { $ actions = $ global ? $ this -> getGlobalActions ( ) : $ this -> getActions ( ) ; //loop over the actions to find our culprit foreach ( $ actions as $ action ) { if ( $ action -> getOption ( 'action_name' ) === $ name ) { return $ action ; } } return false ; }
Gets an action by name.

@param string $name
@param bool   $global //if true, search the global actions

@return mixed
Gets an action by name .