function UnapprovedComments::create

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

Overrides ContainerFactoryPluginInterface::create

File

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

Class

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

Namespace

Drupal\comment\Plugin\Menu\LocalTask

Code

public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
    return new static($configuration, $plugin_id, $plugin_definition, $container->get('entity_type.manager')
        ->getStorage('comment'));
}

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