You are here

public function CommentDeleteManager::__construct in Comment Delete 8

CommentDelete constructor.

Parameters

\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack.

\Drupal\Core\Database\Connection $connection: The database connection.

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

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

\Drupal\Core\Session\AccountProxyInterface $current_user: The current user.

\Drupal\Core\Messenger\MessengerInterface $messenger: The messenger.

\Drupal\comment_delete\CommentThread $comment_thread: The comment thread ripper.

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

\Drupal\Component\Plugin\Exception\PluginNotFoundException

File

src/CommentDeleteManager.php, line 117

Class

CommentDeleteManager
Service container for comment delete operations.

Namespace

Drupal\comment_delete

Code

public function __construct(RequestStack $request_stack, Connection $connection, ConfigFactoryInterface $config_factory, EntityTypeManagerInterface $entity_type_manager, AccountProxyInterface $current_user, MessengerInterface $messenger, CommentThread $comment_thread) {
  $this->requestStack = $request_stack;
  $this->connection = $connection;
  $this->config = $config_factory
    ->get('comment_delete.config');
  $this->commentStorage = $entity_type_manager
    ->getStorage('comment');
  $this->currentUser = $current_user;
  $this->messenger = $messenger;
  $this->thread = $comment_thread;
}