public function VocabularyListBuilder::__construct in Drupal 9
Same name and namespace in other branches
- 8 core/modules/taxonomy/src/VocabularyListBuilder.php \Drupal\taxonomy\VocabularyListBuilder::__construct()
Constructs a new VocabularyListBuilder object.
Parameters
\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type definition.
\Drupal\Core\Session\AccountInterface $current_user: The current user.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager service.
\Drupal\Core\Render\RendererInterface $renderer: The renderer service.
\Drupal\Core\Messenger\MessengerInterface $messenger: The messenger.
Overrides DraggableListBuilder::__construct
File
- core/
modules/ taxonomy/ src/ VocabularyListBuilder.php, line 70
Class
- VocabularyListBuilder
- Defines a class to build a listing of taxonomy vocabulary entities.
Namespace
Drupal\taxonomyCode
public function __construct(EntityTypeInterface $entity_type, AccountInterface $current_user, EntityTypeManagerInterface $entity_type_manager, RendererInterface $renderer = NULL, MessengerInterface $messenger) {
parent::__construct($entity_type, $entity_type_manager
->getStorage($entity_type
->id()));
$this->currentUser = $current_user;
$this->entityTypeManager = $entity_type_manager;
$this->renderer = $renderer;
$this->messenger = $messenger;
}