You are here

public function InsertImageWidgetUtility::process in Insert 8

@inheritdoc

Overrides InsertFileWidgetUtility::process

File

src/Utility/InsertImageWidgetUtility.php, line 89

Class

InsertImageWidgetUtility

Namespace

Drupal\insert\Utility

Code

public function process($element, FormStateInterface $form_state) {
  $element = parent::process($element, $form_state);
  if ($element === null) {
    return null;
  }
  $element['insert']['button']['#insert_rotate'] = !!$element['#insert_rotate'];
  return $element;
}