function UnapprovedComments::__construct

Same name in other branches
  1. 8.9.x core/modules/comment/src/Plugin/Menu/LocalTask/UnapprovedComments.php \Drupal\comment\Plugin\Menu\LocalTask\UnapprovedComments::__construct()
  2. 10 core/modules/comment/src/Plugin/Menu/LocalTask/UnapprovedComments.php \Drupal\comment\Plugin\Menu\LocalTask\UnapprovedComments::__construct()
  3. 11.x core/modules/comment/src/Plugin/Menu/LocalTask/UnapprovedComments.php \Drupal\comment\Plugin\Menu\LocalTask\UnapprovedComments::__construct()

Construct the UnapprovedComments object.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin_id for the plugin instance.

array $plugin_definition: The plugin implementation definition.

\Drupal\comment\CommentStorageInterface $comment_storage: The comment storage service.

Overrides PluginBase::__construct

File

core/modules/comment/src/Plugin/Menu/LocalTask/UnapprovedComments.php, line 37

Class

UnapprovedComments
Provides a local task that shows the amount of unapproved comments.

Namespace

Drupal\comment\Plugin\Menu\LocalTask

Code

public function __construct(array $configuration, $plugin_id, array $plugin_definition, CommentStorageInterface $comment_storage) {
    parent::__construct($configuration, $plugin_id, $plugin_definition);
    $this->commentStorage = $comment_storage;
}

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