public function DateFormatDeleteForm::buildForm

Parameters

string $format_id: The date format ID.

Overrides ConfirmFormBase::buildForm

File

drupal/core/modules/system/lib/Drupal/system/Form/DateFormatDeleteForm.php, line 94
Contains \Drupal\system\Form\DateFormatDeleteForm.

Class

DateFormatDeleteForm
Builds a form to delete a date format.

Namespace

Drupal\system\Form

Code

public function buildForm(array $form, array &$form_state, $format_id = NULL) {

  // We don't get the format ID in the returned format array.
  $this->formatID = $format_id;
  $this->format = $this->configFactory
    ->get('system.date')
    ->get("formats.{$format_id}");
  return parent::buildForm($form, $form_state);
}