You are here

public function PhotosAdminStructureForm::submitForm in Album Photos 6.0.x

Same name and namespace in other branches
  1. 8.5 src/Form/PhotosAdminStructureForm.php \Drupal\photos\Form\PhotosAdminStructureForm::submitForm()

Form submission handler.

Parameters

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

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

Overrides ConfigFormBase::submitForm

File

src/Form/PhotosAdminStructureForm.php, line 119

Class

PhotosAdminStructureForm
Defines a form to configure maintenance settings for this site.

Namespace

Drupal\photos\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  parent::submitForm($form, $form_state);
  $this
    ->config('photos.settings')
    ->set('view_mode_rearrange_album_page', $form_state
    ->getValue('view_mode_rearrange_album_page'))
    ->set('view_mode_rearrange_image_page', $form_state
    ->getValue('view_mode_rearrange_image_page'))
    ->save();
}