public function ModerationSidebarController::__construct in Moderation Sidebar 8
Creates a ModerationSidebarController instance.
Parameters
\Drupal\content_moderation\ModerationInformation $moderation_information: The moderation information service.
\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack service.
\Drupal\Core\Datetime\DateFormatterInterface $date_formatter: The date formatter service.
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler service.
\Drupal\Core\Menu\LocalTaskManagerInterface $local_task_manager: The local task manager.
File
- src/
Controller/ ModerationSidebarController.php, line 81
Class
- ModerationSidebarController
- Endpoints for the Moderation Sidebar module.
Namespace
Drupal\moderation_sidebar\ControllerCode
public function __construct(ModerationInformation $moderation_information, RequestStack $request_stack, DateFormatterInterface $date_formatter, ModuleHandlerInterface $module_handler, LocalTaskManagerInterface $local_task_manager) {
$this->moderationInformation = $moderation_information;
$this->request = $request_stack
->getCurrentRequest();
$this->dateFormatter = $date_formatter;
$this->moduleHandler = $module_handler;
$this->localTaskManager = $local_task_manager;
}