W3cubDocs

/Drupal 8

interface 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

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.
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.

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Render!Element!ElementInterface.php/interface/ElementInterface/8.1.x