function CommentManager::__construct
Same name and namespace in other branches
- 11.x core/modules/comment/src/CommentManager.php \Drupal\comment\CommentManager::__construct()
- 10 core/modules/comment/src/CommentManager.php \Drupal\comment\CommentManager::__construct()
- 9 core/modules/comment/src/CommentManager.php \Drupal\comment\CommentManager::__construct()
- 8.9.x core/modules/comment/src/CommentManager.php \Drupal\comment\CommentManager::__construct()
Construct the CommentManager object.
Parameters
\Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager: The entity type manager service.
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.
\Drupal\Core\StringTranslation\TranslationInterface $string_translation: The string translation service.
\Drupal\Core\Extension\ModuleHandlerInterface $moduleHandler: The module handler service.
\Drupal\Core\Session\AccountInterface $currentUser: The current user.
\Drupal\Core\Entity\EntityFieldManagerInterface $entityFieldManager: The entity field manager service.
\Drupal\Core\Entity\EntityDisplayRepositoryInterface $entityDisplayRepository: The entity display repository service.
File
-
core/
modules/ comment/ src/ CommentManager.php, line 59
Class
- CommentManager
- Comment manager contains common functions to manage comment fields.
Namespace
Drupal\commentCode
public function __construct(protected EntityTypeManagerInterface $entityTypeManager, ConfigFactoryInterface $config_factory, TranslationInterface $string_translation, protected ModuleHandlerInterface $moduleHandler, protected AccountInterface $currentUser, protected EntityFieldManagerInterface $entityFieldManager, protected EntityDisplayRepositoryInterface $entityDisplayRepository) {
$this->userConfig = $config_factory->get('user.settings');
$this->stringTranslation = $string_translation;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.