public function ContentHubViewSubscriber::__construct in Acquia Content Hub 8
ContentHubViewSubscriber constructor.
Parameters
\Drupal\Core\Routing\RouteMatchInterface $route_match: The current route match.
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.
\Drupal\Core\Session\AccountSwitcherInterface $account_switcher: The Account Switcher Service.
\Drupal\Core\Logger\LoggerChannelFactoryInterface $logger_factory: The logger factory.
File
- src/
EventSubscriber/ ContentHubViewSubscriber.php, line 76
Class
- ContentHubViewSubscriber
- View subscriber rendering main content render arrays into responses.
Namespace
Drupal\acquia_contenthub\EventSubscriberCode
public function __construct(RouteMatchInterface $route_match, ConfigFactoryInterface $config_factory, AccountSwitcherInterface $account_switcher, LoggerChannelFactoryInterface $logger_factory) {
$this->routeMatch = $route_match;
$this->configFactory = $config_factory;
$this->accountSwitcher = $account_switcher;
$this->renderAccount = new ContentHubUserSession($this->configFactory
->get('acquia_contenthub.entity_config')
->get('user_role'));
$this->loggerFactory = $logger_factory;
}