ElementInterface

Provides an interface for render element plugins.

Render element plugins allow modules to declare their own Render API element types and specify the default values for the properties. The values returned by the getInfo() method of the element plugin will be merged with the properties specified in render arrays. Thus, you can specify defaults for any Render API keys, in addition to those explicitly documented by \Drupal\Core\Render\ElementInfoManagerInterface::getInfo().

Some render elements are specifically form input elements; see \Drupal\Core\Render\Element\FormElementInterface for more information.

Hierarchy

  • interface \Drupal\Component\Plugin\PluginInspectionInterface

See also

\Drupal\Core\Render\ElementInfoManager

\Drupal\Core\Render\Annotation\RenderElement

\Drupal\Core\Render\Element\RenderElement

Plugin API

Related topics

Render API overview
Overview of the Theme system and Render API.

File

core/lib/Drupal/Core/Render/Element/ElementInterface.php, line 27

Namespace

Drupal\Core\Render\Element

Members

Name Modifiers Type Description
ElementInterface::getInfo public function Returns the element properties for this element. Overrides ElementInterface::getInfo
ElementInterface::setAttributes public static function Sets a form element's class attribute.
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation.
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance.
doc_Drupal
2016-10-29 09:04:05
Comments
Leave a Comment

Please login to continue.