class DateFormatDeleteForm
Same name and namespace in other branches
- 11.x core/modules/system/src/Form/DateFormatDeleteForm.php \Drupal\system\Form\DateFormatDeleteForm
Builds a form to delete a date format.
@internal
Hierarchy
- class \Drupal\Core\Form\FormBase extends \Drupal\Core\Form\FormInterface, \Drupal\Core\DependencyInjection\ContainerInjectionInterface uses \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Logger\LoggerChannelTrait, \Drupal\Core\Messenger\MessengerTrait, \Drupal\Core\Routing\RedirectDestinationTrait, \Drupal\Core\StringTranslation\StringTranslationTrait
- class \Drupal\Core\Entity\EntityForm extends \Drupal\Core\Entity\EntityFormInterface implements \Drupal\Core\Form\FormBase
- class \Drupal\Core\Entity\EntityConfirmFormBase extends \Drupal\Core\Form\ConfirmFormInterface implements \Drupal\Core\Entity\EntityForm
- class \Drupal\Core\Entity\EntityDeleteForm uses \Drupal\Core\Entity\EntityDeleteFormTrait implements \Drupal\Core\Entity\EntityConfirmFormBase
- class \Drupal\system\Form\DateFormatDeleteForm implements \Drupal\Core\Entity\EntityDeleteForm
- class \Drupal\Core\Entity\EntityDeleteForm uses \Drupal\Core\Entity\EntityDeleteFormTrait implements \Drupal\Core\Entity\EntityConfirmFormBase
- class \Drupal\Core\Entity\EntityConfirmFormBase extends \Drupal\Core\Form\ConfirmFormInterface implements \Drupal\Core\Entity\EntityForm
- class \Drupal\Core\Entity\EntityForm extends \Drupal\Core\Entity\EntityFormInterface implements \Drupal\Core\Form\FormBase
Expanded class hierarchy of DateFormatDeleteForm
File
-
core/
modules/ system/ src/ Form/ DateFormatDeleteForm.php, line 14
Namespace
Drupal\system\FormView source
class DateFormatDeleteForm extends EntityDeleteForm {
/**
* The date formatter service.
*
* @var \Drupal\Core\Datetime\DateFormatterInterface
*/
protected $dateFormatter;
/**
* Constructs a DateFormatDeleteForm object.
*
* @param \Drupal\Core\Datetime\DateFormatterInterface $date_formatter
* The date formatter service.
*/
public function __construct(DateFormatterInterface $date_formatter) {
$this->dateFormatter = $date_formatter;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container) {
return new static($container->get('date.formatter'));
}
/**
* {@inheritdoc}
*/
public function getQuestion() {
return $this->t('Are you sure you want to delete the format %name : %format?', [
'%name' => $this->entity
->label(),
'%format' => $this->dateFormatter
->format(REQUEST_TIME, $this->entity
->id()),
]);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.