function CommentAdminOverview::__construct

Same name and namespace in other branches
  1. 11.x core/modules/comment/src/Form/CommentAdminOverview.php \Drupal\comment\Form\CommentAdminOverview::__construct()
  2. 10 core/modules/comment/src/Form/CommentAdminOverview.php \Drupal\comment\Form\CommentAdminOverview::__construct()
  3. 9 core/modules/comment/src/Form/CommentAdminOverview.php \Drupal\comment\Form\CommentAdminOverview::__construct()
  4. 8.9.x core/modules/comment/src/Form/CommentAdminOverview.php \Drupal\comment\Form\CommentAdminOverview::__construct()

Creates a CommentAdminOverview form.

Parameters

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

\Drupal\Core\Datetime\DateFormatterInterface $dateFormatter: The date formatter service.

\Drupal\Core\TempStore\PrivateTempStoreFactory $tempStoreFactory: The tempstore factory.

File

core/modules/comment/src/Form/CommentAdminOverview.php, line 38

Class

CommentAdminOverview
Provides the comments overview administration form.

Namespace

Drupal\comment\Form

Code

public function __construct(protected EntityTypeManagerInterface $entityTypeManager, protected DateFormatterInterface $dateFormatter, protected PrivateTempStoreFactory $tempStoreFactory) {
  $this->commentStorage = $this->entityTypeManager
    ->getStorage('comment');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.