You are here

public function FormHelper::applyStandardProcessing in Varbase: The Ultimate Drupal CMS Starter Kit (Bootstrap Ready) 8.8

Same name and namespace in other branches
  1. 8.4 src/Form/FormHelper.php \Drupal\varbase\Form\FormHelper::applyStandardProcessing()
  2. 8.5 src/Form/FormHelper.php \Drupal\varbase\Form\FormHelper::applyStandardProcessing()
  3. 8.6 src/Form/FormHelper.php \Drupal\varbase\Form\FormHelper::applyStandardProcessing()
  4. 8.7 src/Form/FormHelper.php \Drupal\varbase\Form\FormHelper::applyStandardProcessing()
  5. 9.0.x src/Form/FormHelper.php \Drupal\varbase\Form\FormHelper::applyStandardProcessing()

Applies standard process for elements in the form.

Parameters

array $element: Form element.

File

src/Form/FormHelper.php, line 35

Class

FormHelper
Form helper.

Namespace

Drupal\varbase\Form

Code

public function applyStandardProcessing(array &$element) {
  if (empty($element['#process'])) {
    $info = $this->elementInfo
      ->getInfo($element['#type']);
    if (isset($info['#process'])) {
      $element['#process'] = $info['#process'];
    }
  }
}