src/Controller/Component/CrudComponent.php
public function mapAction($action, $config = [], $enable = true)
    {
        if (is_string($config)) {
            $config = ['className' => $config];
        }
        $action = Inflector::variable($action);
        $this->setConfig('actions.' . $action, $config);

        if ($enable) {
            $this->enable($action);
        }
    }
public function mapAction($action, $config = [], $enable = true)
    {
        if (is_string($config)) {
            $config = ['className' => $config];
        }
        $action = Inflector::variable($action);
        $this->setConfig('actions.' . $action, $config);

        if ($enable) {
            $this->enable($action);
        }
    }
public function mapAction ( $ action , $ config = [ ] , $ enable = true ) { if ( is_string ( $ config ) ) { $ config = [ 'className' => $ config ] ; } $ action = Inflector :: variable ( $ action ) ; $ this -> setConfig ( 'actions.' . $ action , $ config ) ; if ( $ enable ) { $ this -> enable ( $ action ) ; } }
Map action to an internal request type.

@param string $action The Controller action to provide an implementation for.
@param string|array $config Config array or class name like Crud.Index.
@param bool $enable Should the mapping be enabled right away?
@return void
@throws \Crud\Error\Exception\ActionNotConfiguredException
@throws \Crud\Error\Exception\MissingActionException
Map action to an internal request type .