function RenderElementHelper::alterElementInfo

Same name and namespace in other branches
  1. 9 core/modules/inline_form_errors/src/RenderElementHelper.php \Drupal\inline_form_errors\RenderElementHelper::alterElementInfo()
  2. 8.9.x core/modules/inline_form_errors/src/RenderElementHelper.php \Drupal\inline_form_errors\RenderElementHelper::alterElementInfo()
  3. 10 core/modules/inline_form_errors/src/RenderElementHelper.php \Drupal\inline_form_errors\RenderElementHelper::alterElementInfo()

Alters the element type info.

Parameters

array $info: An associative array with structure identical to that of the return value of \Drupal\Core\Render\ElementInfoManagerInterface::getInfo().

File

core/modules/inline_form_errors/src/RenderElementHelper.php, line 19

Class

RenderElementHelper
Provides functionality to process render elements.

Namespace

Drupal\inline_form_errors

Code

public function alterElementInfo(array &$info) {
    foreach ($info as $element_type => $element_info) {
        $info[$element_type]['#process'][] = [
            static::class,
            'processElement',
        ];
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.