Twig_Template::hasBlock
Returns whether a block exists or not.
This method is for internal use only and should never be called directly. This method does only return blocks defined in the current template or defined in "used" traits. It does not return blocks from parent templates as the parent template name can be dynamic, which is only known based on the current context.
Signature
public function hasBlock(string
$name )
Parameters
$name
— string- The block name
Returns
- Boolean
- true if the block exists, false otherwise