src/Controller/Component/CrudComponent.php
public function view($action, $view = null)
    {
        if (is_array($action)) {
            foreach ($action as $realAction => $realView) {
                $this->action($realAction)->view($realView);
            }

            return;
        }

        $this->action($action)->view($view);
    }
public function view($action, $view = null)
    {
        if (is_array($action)) {
            foreach ($action as $realAction => $realView) {
                $this->action($realAction)->view($realView);
            }

            return;
        }

        $this->action($action)->view($view);
    }
public function view ( $ action , $ view = null ) { if ( is_array ( $ action ) ) { foreach ( $ action as $ realAction => $ realView ) { $ this -> action ( $ realAction ) -> view ( $ realView ) ; } return ; } $ this -> action ( $ action ) -> view ( $ view ) ; }
Map the view file to use for a controller action.

To map multiple action views in one go pass an array as first argument and no second argument.

@param string|array $action Action or array of actions
@param string|null $view View name
@return void
@throws \Crud\Error\Exception\ActionNotConfiguredException
@throws \Crud\Error\Exception\MissingActionException
Map the view file to use for a controller action .