COMMENT_ANONYMOUS_MAYNOT_CONTACT

Anonymous posters cannot enter their contact information. File core/modules/comment/comment.module, line 32 Enables users to comment on published content. Code const COMMENT_ANONYMOUS_MAYNOT_CONTACT = 0;

CommentViewsData::getViewsData

public CommentViewsData::getViewsData() Returns views data for the entity type. Return value array Views data in the format of hook_views_data(). Overrides EntityViewsData::getViewsData File core/modules/comment/src/CommentViewsData.php, line 15 Class CommentViewsData Provides views data for the comment entity type. Namespace Drupal\comment Code public function getViewsData() { $data = parent::getViewsData(); $data['comment_field_data']['table']['base']['help'] = $this->t('Com

CommentViewsData

Provides views data for the comment entity type. Hierarchy class \Drupal\views\EntityViewsData implements EntityHandlerInterface, EntityViewsDataInterface uses StringTranslationTraitclass \Drupal\comment\CommentViewsData File core/modules/comment/src/CommentViewsData.php, line 10 Namespace Drupal\comment Members Name Modifiers Type Description CommentViewsData::getViewsData public function Returns views data for the entity type. Overrides EntityViewsData::getViewsData

CommentViewBuilder::getBuildDefaults

protected CommentViewBuilder::getBuildDefaults(EntityInterface $entity, $view_mode) Provides entity-specific defaults to the build process. Parameters \Drupal\Core\Entity\EntityInterface $entity: The entity for which the defaults should be provided. string $view_mode: The view mode that should be used. Return value array Overrides EntityViewBuilder::getBuildDefaults File core/modules/comment/src/CommentViewBuilder.php, line 58 Class CommentViewBuilder View builder handler for comments.

CommentViewBuilder::createInstance

public static CommentViewBuilder::createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) Instantiates a new instance of this entity handler. This is a factory method that returns a new instance of this object. The factory should pass any needed dependencies into the constructor of this object, but not the container itself. Every call to this method must return a new instance of this object; that is, it may not implement a singleton. Parameters \Symfony\Component\Depend

CommentViewBuilder::buildComponents

public CommentViewBuilder::buildComponents(array &$build, array $entities, array $displays, $view_mode) In addition to modifying the content key on entities, this implementation will also set the comment entity key which all comments carry. Throws \InvalidArgumentException Thrown when a comment is attached to an entity that no longer exists. Overrides EntityViewBuilder::buildComponents File core/modules/comment/src/CommentViewBuilder.php, line 84 Class CommentViewBuilder View builder

CommentViewBuilder::__construct

public CommentViewBuilder::__construct(EntityTypeInterface $entity_type, EntityManagerInterface $entity_manager, LanguageManagerInterface $language_manager, AccountInterface $current_user) Constructs a new CommentViewBuilder. Parameters \Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type definition. \Drupal\Core\Entity\EntityManagerInterface $entity_manager: The entity manager service. \Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager. \Dr

CommentViewBuilder::alterBuild

protected CommentViewBuilder::alterBuild(array &$build, EntityInterface $comment, EntityViewDisplayInterface $display, $view_mode) Specific per-entity building. Parameters array $build: The render array that is being created. \Drupal\Core\Entity\EntityInterface $entity: The entity to be prepared. \Drupal\Core\Entity\Display\EntityViewDisplayInterface $display: The entity view display holding the display options configured for the entity components. string $view_mode: The view mode that sho

CommentViewBuilder

View builder handler for comments. Hierarchy class \Drupal\Core\Entity\EntityHandlerBase uses DependencySerializationTrait, StringTranslationTraitclass \Drupal\Core\Entity\EntityViewBuilder implements EntityHandlerInterface, EntityViewBuilderInterfaceclass \Drupal\comment\CommentViewBuilder File core/modules/comment/src/CommentViewBuilder.php, line 17 Namespace Drupal\comment Members Name Modifiers Type Description CommentViewBuilder::$currentUser protected property Th

CommentViewBuilder::$currentUser

The current user. Type: \Drupal\Core\Session\AccountInterface File core/modules/comment/src/CommentViewBuilder.php, line 24 Class CommentViewBuilder View builder handler for comments. Namespace Drupal\comment Code protected $currentUser;