You are here

public function ContextBreadcrumbBuilder::__construct in Context Breadcrumb 8

Constructs the ConextBreadcrumbBuilder.

Parameters

\Drupal\Core\Entity\EntityTypeManagerInterface $entityManager: The entity manager.

\Drupal\Core\Session\AccountInterface $account: The current user account.

\Drupal\Core\Utility\Token $token: The token.

\Drupal\context\ContextManager $contextManager: The context manager.

\Drupal\Core\Logger\LoggerChannelFactoryInterface $logger: The logger.

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

\Drupal\Component\Plugin\Exception\PluginNotFoundException

File

src/Breadcrumb/ContextBreadcrumbBuilder.php, line 110

Class

ContextBreadcrumbBuilder
Class ConextBreadcrumbBuilder.

Namespace

Drupal\context_breadcrumb\Breadcrumb

Code

public function __construct(EntityTypeManagerInterface $entityManager, AccountInterface $account, Token $token, ContextManager $contextManager, LoggerChannelFactoryInterface $logger) {
  $this->entityManager = $entityManager;
  $this->nodeStorage = $entityManager
    ->getStorage('node');
  $this->userStorage = $entityManager
    ->getStorage('user');
  $this->termStorage = $entityManager
    ->getStorage('taxonomy_term');
  $this->user = $account;
  $this->token = $token;
  $this->contextManager = $contextManager;
  $this->logger = $logger;
}