function DateFormatFormBase::save
Overrides EntityForm::save
File
- 
              core/modules/ system/ src/ Form/ DateFormatFormBase.php, line 146 
Class
- DateFormatFormBase
- Provides a base form for date formats.
Namespace
Drupal\system\FormCode
public function save(array $form, FormStateInterface $form_state) {
  $status = $this->entity
    ->save();
  if ($status == SAVED_UPDATED) {
    $this->messenger()
      ->addStatus($this->t('Custom date format updated.'));
  }
  else {
    $this->messenger()
      ->addStatus($this->t('Custom date format added.'));
  }
  $form_state->setRedirectUrl($this->entity
    ->toUrl('collection'));
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
