public function addAlias($name, $actions)
    {
        $actions = (array) $actions;
        $this->addAliasAction($name, $actions);
        parent::addAlias($name, $this->getExpandActions($actions));
    }
public function addAlias($name, $actions)
    {
        $actions = (array) $actions;
        $this->addAliasAction($name, $actions);
        parent::addAlias($name, $this->getExpandActions($actions));
    }
public function addAlias ( $ name , $ actions ) { $ actions = ( array ) $ actions ; $ this -> addAliasAction ( $ name , $ actions ) ; parent :: addAlias ( $ name , $ this -> getExpandActions ( $ actions ) ) ; }
Define new alias for an action

$this->$authority->addAlias('read', ['index', 'show']);
$this->$authority->addAlias('create', 'new');
$this->$authority->addAlias('update', 'edit');

This way one can use $params['action'] in the controller to determine the permission.

@param string $name Name of action
@param string|array $actions Action(s) that $name aliases
@return RuleAlias
Define new alias for an action