You are here

public function ForumBreadcrumbBuilderBase::__construct in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/forum/src/Breadcrumb/ForumBreadcrumbBuilderBase.php \Drupal\forum\Breadcrumb\ForumBreadcrumbBuilderBase::__construct()
  2. 9 core/modules/forum/src/Breadcrumb/ForumBreadcrumbBuilderBase.php \Drupal\forum\Breadcrumb\ForumBreadcrumbBuilderBase::__construct()

Constructs a forum breadcrumb builder object.

Parameters

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The configuration factory.

\Drupal\forum\ForumManagerInterface $forum_manager: The forum manager service.

\Drupal\Core\StringTranslation\TranslationInterface $string_translation: The string translation service.

File

core/modules/forum/src/Breadcrumb/ForumBreadcrumbBuilderBase.php, line 64

Class

ForumBreadcrumbBuilderBase
Provides a forum breadcrumb base class.

Namespace

Drupal\forum\Breadcrumb

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager, ConfigFactoryInterface $config_factory, ForumManagerInterface $forum_manager, TranslationInterface $string_translation) {
  $this->entityTypeManager = $entity_type_manager;
  $this->config = $config_factory
    ->get('forum.settings');
  $this->forumManager = $forum_manager;
  $this
    ->setStringTranslation($string_translation);
  $this->termStorage = $entity_type_manager
    ->getStorage('taxonomy_term');
}