function DateFormatEditForm::__construct
Same name in other branches
- 11.x core/modules/system/src/Form/DateFormatEditForm.php \Drupal\system\Form\DateFormatEditForm::__construct()
Constructs a DateFormatEditForm object.
Parameters
\Drupal\Core\Datetime\DateFormatterInterface $date_formatter: The date service.
\Drupal\Core\Config\Entity\ConfigEntityStorageInterface $date_format_storage: The date format storage.
\Drupal\Component\Datetime\TimeInterface|null $time: The time service.
Overrides DateFormatFormBase::__construct
File
-
core/
modules/ system/ src/ Form/ DateFormatEditForm.php, line 28
Class
- DateFormatEditForm
- Provides a form for editing a date format.
Namespace
Drupal\system\FormCode
public function __construct(DateFormatterInterface $date_formatter, ConfigEntityStorageInterface $date_format_storage, ?TimeInterface $time = NULL) {
parent::__construct($date_formatter, $date_format_storage);
if ($this->time === NULL) {
@trigger_error('Calling ' . __METHOD__ . ' without the $time argument is deprecated in drupal:10.3.0 and it will be required in drupal:11.0.0. See https://www.drupal.org/node/3112298', E_USER_DEPRECATED);
$this->time = \Drupal::service('datetime.time');
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.