public CommentManager::__construct(EntityManagerInterface $entity_manager, QueryFactory $query_factory, ConfigFactoryInterface $config_factory, TranslationInterface $string_translation, UrlGeneratorInterface $url_generator, ModuleHandlerInterface $module_handler, AccountInterface $current_user)
Construct the CommentManager object.
Parameters
\Drupal\Core\Entity\EntityManagerInterface $entity_manager: The entity manager service.
\Drupal\Core\Entity\Query\QueryFactory $query_factory: The entity query factory.
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.
\Drupal\Core\StringTranslation\TranslationInterface $string_translation: The string translation service.
\Drupal\Core\Routing\UrlGeneratorInterface $url_generator: The url generator service. @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler The module handler service.
\Drupal\Core\Session\AccountInterface $current_user: The current user.
File
- core/modules/comment/src/CommentManager.php, line 87
Class
- CommentManager
- Comment manager contains common functions to manage comment fields.
Namespace
Drupal\comment
Code
public function __construct(EntityManagerInterface $entity_manager, QueryFactory $query_factory, ConfigFactoryInterface $config_factory, TranslationInterface $string_translation, UrlGeneratorInterface $url_generator, ModuleHandlerInterface $module_handler, AccountInterface $current_user) { $this->entityManager = $entity_manager; $this->queryFactory = $query_factory; $this->userConfig = $config_factory->get('user.settings'); $this->stringTranslation = $string_translation; $this->urlGenerator = $url_generator; $this->moduleHandler = $module_handler; $this->currentUser = $current_user; }
Please login to continue.