CommentManagerInterface::COMMENT_MODE_FLAT

Comments are displayed in a flat list - expanded. File core/modules/comment/src/CommentManagerInterface.php, line 15 Class CommentManagerInterface Comment manager contains common functions to manage comment fields. Namespace Drupal\comment Code const COMMENT_MODE_FLAT = 0;

CommentManagerInterface::getCountNewComments

public CommentManagerInterface::getCountNewComments(EntityInterface $entity, $field_name = NULL, $timestamp = 0) Returns the number of new comments available on a given entity for a user. Parameters \Drupal\Core\Entity\EntityInterface $entity: The entity to which the comments are attached to. string $field_name: (optional) The field_name to count comments for. Defaults to any field. int $timestamp: (optional) Time to count from. Defaults to time of last user access the entity. Return value in

CommentManagerInterface::forbiddenMessage

public CommentManagerInterface::forbiddenMessage(EntityInterface $entity, $field_name) Provides a message if posting comments is forbidden. If authenticated users can post comments, a message is returned that prompts the anonymous user to log in (or register, if applicable) that redirects to entity comment form. Otherwise, no message is returned. Parameters \Drupal\Core\Entity\EntityInterface $entity: The entity to which comments are attached to. string $field_name: The field name on the entit

CommentManagerInterface::COMMENT_MODE_THREADED

Comments are displayed as a threaded list - expanded. File core/modules/comment/src/CommentManagerInterface.php, line 20 Class CommentManagerInterface Comment manager contains common functions to manage comment fields. Namespace Drupal\comment Code const COMMENT_MODE_THREADED = 1;

CommentManagerInterface::addBodyField

public CommentManagerInterface::addBodyField($comment_type) Creates a comment_body field. Parameters string $comment_type: The comment bundle. File core/modules/comment/src/CommentManagerInterface.php, line 45 Class CommentManagerInterface Comment manager contains common functions to manage comment fields. Namespace Drupal\comment Code public function addBodyField($comment_type);

CommentManager::getFields

public CommentManager::getFields($entity_type_id) Utility function to return an array of comment fields. Parameters string $entity_type_id: The content entity type to which the comment fields are attached. Return value array An array of comment field map definitions, keyed by field name. Each value is an array with two entries: type: The field type. bundles: The bundles in which the field appears, as an array with entity types as keys and the array of bundle names as values. Overrides Com

CommentManager::getCountNewComments

public CommentManager::getCountNewComments(EntityInterface $entity, $field_name = NULL, $timestamp = 0) Returns the number of new comments available on a given entity for a user. Parameters \Drupal\Core\Entity\EntityInterface $entity: The entity to which the comments are attached to. string $field_name: (optional) The field_name to count comments for. Defaults to any field. int $timestamp: (optional) Time to count from. Defaults to time of last user access the entity. Return value int|false T

CommentManagerInterface

Comment manager contains common functions to manage comment fields. Hierarchy interface \Drupal\comment\CommentManagerInterface File core/modules/comment/src/CommentManagerInterface.php, line 10 Namespace Drupal\comment Members Name Modifiers Type Description CommentManagerInterface::addBodyField public function Creates a comment_body field. CommentManagerInterface::COMMENT_MODE_FLAT constant Comments are displayed in a flat list - expanded. CommentManagerInter

CommentManager::__construct

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

CommentManager::$queryFactory

The entity query factory. Type: \Drupal\Core\Entity\Query\QueryFactory File core/modules/comment/src/CommentManager.php, line 39 Class CommentManager Comment manager contains common functions to manage comment fields. Namespace Drupal\comment Code protected $queryFactory;