ElementInfoManager

Provides a plugin manager for element plugins. Hierarchy class \Drupal\Component\Plugin\PluginManagerBase implements PluginManagerInterface uses DiscoveryTraitclass \Drupal\Core\Plugin\DefaultPluginManager implements CachedDiscoveryInterface, PluginManagerInterface, CacheableDependencyInterface uses DiscoveryCachedTrait, UseCacheBackendTraitclass \Drupal\Core\Render\ElementInfoManager implements ElementInfoManagerInterface See also \Drupal\Core\Render\Annotation\RenderElement \Drupal\Core

Element::__construct

public Element::__construct(PluginManagerInterface $plugin_manager) Constructs a new Element object. Parameters \Drupal\Component\Plugin\PluginManagerInterface $plugin_manager: The Text Editor plugin manager service. File core/modules/editor/src/Element.php, line 28 Class Element Defines a service for Text Editor's render elements. Namespace Drupal\editor Code public function __construct(PluginManagerInterface $plugin_manager) { $this->pluginManager = $plugin_manager; }

Element::setTypedDataManager

public Element::setTypedDataManager(TypedDataManagerInterface $typed_data_manager) Sets the typed config manager. Overrides \Drupal\Core\TypedData\TypedDataTrait::setTypedDataManager() to ensure that only typed configuration manager can be used. Parameters \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager: The typed config manager. This must be an instance of \Drupal\Core\Config\TypedConfigManagerInterface. If it is not, then this method will error when assertions are enable

Element::setAttributes

public static Element::setAttributes(array &$element, array $map) Sets HTML attributes based on element properties. Parameters array $element: The renderable element to process. Passed by reference. array $map: An associative array whose keys are element property names and whose values are the HTML attribute names to set on the corresponding property; e.g., array('#propertyname' => 'attributename'). If both names are identical except for the leading '#', then an attribute name value is

Element::property

public static Element::property($key) Checks if the key is a property. Parameters string $key: The key to check. Return value bool TRUE of the key is a property, FALSE otherwise. File core/lib/Drupal/Core/Render/Element.php, line 26 Class Element Provides helper methods for Drupal render elements. Namespace Drupal\Core\Render Code public static function property($key) { return $key[0] == '#'; }

Element::properties

public static Element::properties(array $element) Gets properties of a structured array element (keys beginning with '#'). Parameters array $element: An element array to return properties for. Return value array An array of property keys for the element. File core/lib/Drupal/Core/Render/Element.php, line 39 Class Element Provides helper methods for Drupal render elements. Namespace Drupal\Core\Render Code public static function properties(array $element) { return array_filter(array

Element::preRenderTextFormat

Element::preRenderTextFormat(array $element) Additional #pre_render callback for 'text_format' elements. File core/modules/editor/src/Element.php, line 35 Class Element Defines a service for Text Editor's render elements. Namespace Drupal\editor Code function preRenderTextFormat(array $element) { // Allow modules to programmatically enforce no client-side editor by // setting the #editor property to FALSE. if (isset($element['#editor']) && !$element['#editor']) { retu

Element::isVisibleElement

public static Element::isVisibleElement($element) Determines if an element is visible. Parameters array $element: The element to check for visibility. Return value bool TRUE if the element is visible, otherwise FALSE. File core/lib/Drupal/Core/Render/Element.php, line 155 Class Element Provides helper methods for Drupal render elements. Namespace Drupal\Core\Render Code public static function isVisibleElement($element) { return (!isset($element['#type']) || !in_array($element['#typ

Element::isEmpty

public static Element::isEmpty(array $elements) Indicates whether the given element is empty. An element that only has #cache set is considered empty, because it will render to the empty string. Parameters array $elements: The element. Return value bool Whether the given element is empty. File core/lib/Drupal/Core/Render/Element.php, line 198 Class Element Provides helper methods for Drupal render elements. Namespace Drupal\Core\Render Code public static function isEmpty(array $eleme

Element::getVisibleChildren

public static Element::getVisibleChildren(array $elements) Returns the visible children of an element. Parameters array $elements: The parent element. Return value array The array keys of the element's visible children. File core/lib/Drupal/Core/Render/Element.php, line 129 Class Element Provides helper methods for Drupal render elements. Namespace Drupal\Core\Render Code public static function getVisibleChildren(array $elements) { $visible_children = array(); foreach (static::c