RenderElement::setAttributes

public static RenderElement::setAttributes(&$element, $class = array()) Sets a form element's class attribute. Adds 'required' and 'error' classes as needed. Parameters array $element: The form element. array $class: Array of new class names to be added. Overrides ElementInterface::setAttributes File core/lib/Drupal/Core/Render/Element/RenderElement.php, line 129 Class RenderElement Provides a base class for render element plugins. Namespace Drupal\Core\Render\Element Code public

RenderElement::processGroup

public static RenderElement::processGroup(&$element, FormStateInterface $form_state, &$complete_form) Arranges elements into groups. This method is useful for non-input elements that can be used in and outside the context of a form. Parameters array $element: An associative array containing the properties and children of the element. Note that $element must be taken by reference here, so processed child elements are taken over into $form_state. \Drupal\Core\Form\FormStateInterface $for

RenderElement::processAjaxForm

public static RenderElement::processAjaxForm(&$element, FormStateInterface $form_state, &$complete_form) Form element processing handler for the #ajax form property. This method is useful for non-input elements that can be used in and outside the context of a form. Parameters array $element: An associative array containing the properties of the element. \Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. array $complete_form: The complete form structure. Re

RenderElement::preRenderGroup

public static RenderElement::preRenderGroup($element) Adds members of this group as actual elements for rendering. Parameters array $element: An associative array containing the properties and children of the element. Return value array The modified element with all group members. File core/lib/Drupal/Core/Render/Element/RenderElement.php, line 160 Class RenderElement Provides a base class for render element plugins. Namespace Drupal\Core\Render\Element Code public static function pr

RenderElement::preRenderAjaxForm

public static RenderElement::preRenderAjaxForm($element) Adds Ajax information about an element to communicate with JavaScript. If #ajax is set on an element, this additional JavaScript is added to the page header to attach the Ajax behaviors. See ajax.js for more information. Parameters array $element: An associative array containing the properties of the element. Properties used: #ajax['event'] #ajax['prevent'] #ajax['url'] #ajax['callback'] #ajax['options'] #ajax['wrapper'] #ajax['parameter

RenderElement

Provides a base class for render element plugins. Render elements are referenced in render arrays; see the Render API topic for an overview of render arrays and render elements. The elements of render arrays are divided up into properties (whose keys start with #) and children (whose keys do not start with #). The properties provide data or settings that are used in rendering. Some properties are specific to a particular type of render element, some are available for any render element, and som

RenderElement

Defines a render element plugin annotation object. See \Drupal\Core\Render\Element\ElementInterface for more information about render element plugins. Plugin Namespace: Element For a working example, see \Drupal\Core\Render\Element\Link. Hierarchy class \Drupal\Component\Annotation\AnnotationBase implements AnnotationInterfaceclass \Drupal\Component\Annotation\PluginIDclass \Drupal\Core\Render\Annotation\RenderElement See also \Drupal\Core\Render\ElementInfoManager \Drupal\Core\Render\Ele

RenderContext::update

public RenderContext::update(&$element) Updates the current frame of the stack. Parameters array &$element: The element of the render array that has just been rendered. The stack frame for this element will be updated with the bubbleable rendering metadata of this element. File core/lib/Drupal/Core/Render/RenderContext.php, line 24 Class RenderContext The render context: a stack containing bubbleable rendering metadata. Namespace Drupal\Core\Render Code public function update(

RenderContext::bubble

public RenderContext::bubble() Bubbles the stack. Whenever another level in the render array has been rendered, the stack must be bubbled, to merge its rendering metadata with that of the parent element. File core/lib/Drupal/Core/Render/RenderContext.php, line 41 Class RenderContext The render context: a stack containing bubbleable rendering metadata. Namespace Drupal\Core\Render Code public function bubble() { // If there's only one frame on the stack, then this is the root call, an

RenderContext

The render context: a stack containing bubbleable rendering metadata. A stack of \Drupal\Core\Render\BubbleableMetadata objects. Hierarchy class \Drupal\Core\Render\RenderContext extends \SplStack See also \Drupal\Core\Render\RendererInterface \Drupal\Core\Render\Renderer \Drupal\Core\Render\BubbleableMetadata File core/lib/Drupal/Core/Render/RenderContext.php, line 14 Namespace Drupal\Core\Render Members Name Modifiers Type Description RenderContext::bubble public functio