function ElementInfoManagerInterface::fromRenderable
Creates a render object from a render array.
@template T of ElementInterface
Parameters
\Drupal\Core\Render\Element\ElementInterface|array $element: A render array or render objects. The latter is returned unchanged.
class-string<T> $class: The class of the render object being created.
Return value
T A render object.
1 method overrides ElementInfoManagerInterface::fromRenderable()
- ElementInfoManager::fromRenderable in core/
lib/ Drupal/ Core/ Render/ ElementInfoManager.php - Creates a render object from a render array.
File
-
core/
lib/ Drupal/ Core/ Render/ ElementInfoManagerInterface.php, line 80
Class
- ElementInfoManagerInterface
- Collects available render array element types.
Namespace
Drupal\Core\RenderCode
public function fromRenderable(ElementInterface|array &$element, string $class = Form::class) : ElementInterface;
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.