You are here

public static function InsertImageWidget::process in Insert 8

Form API callback: Processes a image_image field element.

Expands the image_image type to include the alt and title fields.

This method is assigned as a #process callback in formElement() method.

Overrides ImageWidget::process

File

src/Plugin/Field/FieldWidget/InsertImageWidget.php, line 79

Class

InsertImageWidget
Plugin implementation of the Insert Image widget. This is just a barebone set of overwritten methods. All actual logic is deferred to \Drupal\insert\Utility\UtilityImage.

Namespace

Drupal\insert\Plugin\Field\FieldWidget

Code

public static function process($element, FormStateInterface $form_state, $form) {
  $originalElement = $element;
  $element = self::util()
    ->process($element, $form_state);
  return $element === null ? parent::process($originalElement, $form_state, $form) : parent::process($element, $form_state, $form);
}