You are here

public function ImageAPIOptimizePipelineEditForm::save in Image Optimize (or ImageAPI Optimize) 8.3

Same name and namespace in other branches
  1. 8.2 src/Form/ImageAPIOptimizePipelineEditForm.php \Drupal\imageapi_optimize\Form\ImageAPIOptimizePipelineEditForm::save()
  2. 4.x src/Form/ImageAPIOptimizePipelineEditForm.php \Drupal\imageapi_optimize\Form\ImageAPIOptimizePipelineEditForm::save()

Form submission handler for the 'save' action.

Normally this method should be overridden to provide specific messages to the user and redirect the form after the entity has been saved.

Parameters

array $form: An associative array containing the structure of the form.

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

Return value

int Either SAVED_NEW or SAVED_UPDATED, depending on the operation performed.

Overrides ImageAPIOptimizePipelineFormBase::save

1 call to ImageAPIOptimizePipelineEditForm::save()
ImageAPIOptimizePipelineEditForm::processorSave in src/Form/ImageAPIOptimizePipelineEditForm.php
Submit handler for image optimize processor.

File

src/Form/ImageAPIOptimizePipelineEditForm.php, line 242

Class

ImageAPIOptimizePipelineEditForm
Controller for image optimize pipeline edit form.

Namespace

Drupal\imageapi_optimize\Form

Code

public function save(array $form, FormStateInterface $form_state) {
  parent::save($form, $form_state);
  $this
    ->messenger()
    ->addMessage($this
    ->t('Changes to the pipeline have been saved.'));
}