canRender() public method

Determine if the given TypoScript path is renderable, which means it exists and has an implementation.
public canRender ( string $typoScriptPath ) : boolean
$typoScriptPath string
return boolean
 /**
  * Render the view
  *
  * @return string The rendered view
  * @api
  */
 public function render()
 {
     $this->initializeTypoScriptRuntime();
     if ($this->typoScriptRuntime->canRender($this->getTypoScriptPathForCurrentRequest()) || $this->fallbackViewEnabled === false) {
         return $this->renderTypoScript();
     } else {
         return $this->renderFallbackView();
     }
 }
Example #2
0
 /**
  * Post-Processor which is called whenever this object is encountered in a Fluid
  * object access.
  *
  * Evaluates TypoScript objects and eel expressions.
  *
  * @return FusionPathProxy|mixed
  */
 public function objectAccess()
 {
     if (!$this->fusionRuntime->canRender($this->path)) {
         return $this;
     }
     try {
         return $this->fusionRuntime->evaluate($this->path, $this->templateImplementation);
     } catch (\Exception $exception) {
         return $this->fusionRuntime->handleRenderingException($this->path, $exception);
     }
 }