function TranslationStatusForm::__construct
Same name in other branches
- 9 core/modules/locale/src/Form/TranslationStatusForm.php \Drupal\locale\Form\TranslationStatusForm::__construct()
- 8.9.x core/modules/locale/src/Form/TranslationStatusForm.php \Drupal\locale\Form\TranslationStatusForm::__construct()
- 11.x core/modules/locale/src/Form/TranslationStatusForm.php \Drupal\locale\Form\TranslationStatusForm::__construct()
Constructs a TranslationStatusForm object.
Parameters
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: A module handler.
\Drupal\Core\State\StateInterface $state: The state service.
\Drupal\Component\Datetime\TimeInterface|null $time: The time service.
File
-
core/
modules/ locale/ src/ Form/ TranslationStatusForm.php, line 55
Class
- TranslationStatusForm
- Provides a translation status form.
Namespace
Drupal\locale\FormCode
public function __construct(ModuleHandlerInterface $module_handler, StateInterface $state, ?TimeInterface $time = NULL) {
$this->moduleHandler = $module_handler;
$this->state = $state;
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.