public function DashboardForm::__construct in Opigno statistics 3.x
Same name and namespace in other branches
- 8 src/Form/DashboardForm.php \Drupal\opigno_statistics\Form\DashboardForm::__construct()
DashboardForm constructor.
Parameters
\Drupal\Core\Database\Connection $database: The database connecion service.
\Drupal\Component\Datetime\TimeInterface $time: The time service.
\Drupal\Core\Datetime\DateFormatterInterface $date_formatter: The date formatter service.
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler service.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager service.
File
- src/
Form/ DashboardForm.php, line 81
Class
- DashboardForm
- Implements the statistics dashboard.
Namespace
Drupal\opigno_statistics\FormCode
public function __construct(Connection $database, TimeInterface $time, DateFormatterInterface $date_formatter, ModuleHandlerInterface $module_handler, EntityTypeManagerInterface $entity_type_manager) {
$this->database = $database;
$this->time = $time;
$this->dateFormatter = $date_formatter;
$this->moduleHandler = $module_handler;
try {
$this->termStorage = $entity_type_manager
->getStorage('taxonomy_term');
} catch (PluginNotFoundException|InvalidPluginDefinitionException $e) {
watchdog_exception('opigno_dashboard_exception', $e);
}
}