You are here

public static function InsertFileWidget::process in Insert 8

Form API callback: Processes a file_generic field element.

Expands the file_generic type to include the description and display fields.

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

Overrides FileWidget::process

File

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

Class

InsertFileWidget
Plugin implementation of the Insert File widget. This is just a barebone set of overwritten methods. All actual logic is deferred to \Drupal\insert\Utility\Utility as that may be overwritten in other Insert widgets covering other field types.

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);
}