src/Controller/CrudController.php
protected function getTemplate(Request $request, $action)
    {
        $templates = $this->get('prezent_crud.template_guesser')->guessTemplateNames([$this, $action], $request);

        foreach ($templates as $template) {
            if ($this->get('twig')->getLoader()->exists($template)) {
                return $template;
            }
        }

        return array_shift($templates); // This ensures a proper error message about a missing template
    }
protected function getTemplate(Request $request, $action)
    {
        $templates = $this->get('prezent_crud.template_guesser')->guessTemplateNames([$this, $action], $request);

        foreach ($templates as $template) {
            if ($this->get('twig')->getLoader()->exists($template)) {
                return $template;
            }
        }

        return array_shift($templates); // This ensures a proper error message about a missing template
    }
protected function getTemplate ( Request $ request , $ action ) { $ templates = $ this -> get ( 'prezent_crud.template_guesser' ) -> guessTemplateNames ( [ $ this , $ action ] , $ request ) ; foreach ( $ templates as $ template ) { if ( $ this -> get ( 'twig' ) -> getLoader ( ) -> exists ( $ template ) ) { return $ template ; } } return array_shift ( $ templates ) ; // This ensures a proper error message about a missing template }
Get the template for an action

@param Request $request
@param string $action
@return string
Get the template for an action