Symfony\Component\Form\FormRendererEngineInterface::getResourceForBlockNameHierarchy
Returns the resource for a block hierarchy.
A block hierarchy is an array which starts with the root of the hierarchy and continues with the child of that root, the child of that child etc. The following is an example for a block hierarchy: <code> form_widget text_widget url_widget </code> In this example, "url_widget" is the most specific block, while the other blocks are its ancestors in the hierarchy. The second parameter $hierarchyLevel determines the level of the hierarchy that should be rendered. For example, if $hierarchyLevel is 2 for the above hierarchy, the engine will first look for the block "url_widget", then, if that does not exist, for the block "text_widget" etc. The type of the resource is decided by the implementation. The resource is later passed to by the rendering algorithm.
Signature
public function getResourceForBlockNameHierarchy(FormView
$view,
array
$blockNameHierarchy,
integer
$hierarchyLevel )
Parameters
$view
— Symfony\Component\Form\FormView- The view for determining the
used themes. First the themes
attached directly to the view
with are
considered, then the ones of
its parent etc. $blockNameHierarchy
— array- The block name hierarchy, with
the root block at the beginning. $hierarchyLevel
— integer- The level in the hierarchy at
which to start looking. Level 0
indicates the root block, i.e.
the first element of
$blockNameHierarchy.
Returns
- mixed
- The renderer resource or false, if none was found.