You are here

public static function ProcessBase::process in Express 8

Process a specific form element type.

Implementations of this method should check to see if the element has a property named #bootstrap_ignore_process and check if it is set to TRUE. If it is, the method should immediately return with the unaltered element.

Parameters

array $element: The element render array.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

array $complete_form: The complete form structure.

Return value

array The altered element array.

Overrides ProcessInterface::process

See also

\Drupal\bootstrap\Plugin\Alter\ElementInfo::alter

File

themes/contrib/bootstrap/src/Plugin/Process/ProcessBase.php, line 23
Contains \Drupal\bootstrap\Plugin\Process\ProcessBase.

Class

ProcessBase
Base process class used to process elements.

Namespace

Drupal\bootstrap\Plugin\Process

Code

public static function process(array $element, FormStateInterface $form_state, array &$complete_form) {
  if (!empty($element['#bootstrap_ignore_process'])) {
    return $element;
  }
  static::processElement(Element::create($element, $form_state), $form_state, $complete_form);
  return $element;
}