public function hasTemplate()
    {
        try {
            $this->baseRenderingContext->getTemplatePaths()->getTemplateSource(
                $this->baseRenderingContext->getControllerName(),
                $this->baseRenderingContext->getControllerAction()
            );

            return true;
        } catch (InvalidTemplateResourceException $e) {
            return false;
        }
    }
public function hasTemplate()
    {
        try {
            $this->baseRenderingContext->getTemplatePaths()->getTemplateSource(
                $this->baseRenderingContext->getControllerName(),
                $this->baseRenderingContext->getControllerAction()
            );

            return true;
        } catch (InvalidTemplateResourceException $e) {
            return false;
        }
    }
public function hasTemplate ( ) { try { $ this -> baseRenderingContext -> getTemplatePaths ( ) -> getTemplateSource ( $ this -> baseRenderingContext -> getControllerName ( ) , $ this -> baseRenderingContext -> getControllerAction ( ) ) ; return true ; } catch ( InvalidTemplateResourceException $ e ) { return false ; } }
Checks whether a template can be resolved for the current request

@return bool
@api
Checks whether a template can be resolved for the current request