You are here

public static function WebformElementHelper::process in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Utility/WebformElementHelper.php \Drupal\webform\Utility\WebformElementHelper::process()

Process a form element and apply webform element specific enhancements.

This method allows any form API element to be enhanced using webform specific features include custom validation, external libraries, accessibility improvements, etc…

Parameters

array $element: An associative array containing an element with a #type property.

Return value

array The processed form element with webform element specific enhancements.

7 calls to WebformElementHelper::process()
Address::form in src/Plugin/WebformElement/Address.php
Gets the actual configuration webform array to be built.
Webform::buildConfigurationForm in src/Plugin/Condition/Webform.php
Form constructor.
WebformElementAttributes::processWebformElementAttributes in src/Element/WebformElementAttributes.php
Processes element attributes.
WebformEntityPrintAttachment::form in modules/webform_entity_print_attachment/src/Plugin/WebformElement/WebformEntityPrintAttachment.php
Gets the actual configuration webform array to be built.
WebformGroupRoles::processSelect in modules/webform_group/src/Element/WebformGroupRoles.php
Processes a webform roles (checkboxes) element.

... See full list

File

src/Utility/WebformElementHelper.php, line 330

Class

WebformElementHelper
Helper class webform element methods.

Namespace

Drupal\webform\Utility

Code

public static function process(array &$element) {

  /** @var \Drupal\webform\Plugin\WebformElementManagerInterface $element */
  $element_manager = \Drupal::service('plugin.manager.webform.element');
  return $element_manager
    ->processElement($element);
}