comment_field_config_create

comment_field_config_create(FieldConfigInterface $field) Implements hook_ENTITY_TYPE_create() for 'field_config'. File core/modules/comment/comment.module, line 140 Enables users to comment on published content. Code function comment_field_config_create(FieldConfigInterface $field) { if ($field->getType() == 'comment' && !$field->isSyncing()) { // Assign default values for the field. $default_value = $field->getDefaultValueLiteral(); $default_value += array(arra

comment_entity_view_display_presave

comment_entity_view_display_presave(EntityViewDisplayInterface $display) Implements hook_ENTITY_TYPE_presave() for entity_view_display entities. File core/modules/comment/comment.module, line 764 Enables users to comment on published content. Code function comment_entity_view_display_presave(EntityViewDisplayInterface $display) { // Act only on comment view displays being disabled. if ($display->isNew() || $display->getTargetEntityTypeId() !== 'comment' || $display->status()) {

comment_entity_view

comment_entity_view(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display, $view_mode) Implements hook_entity_view(). File core/modules/comment/comment.module, line 212 Enables users to comment on published content. Code function comment_entity_view(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display, $view_mode) { if ($entity instanceof FieldableEntityInterface && $view_mode == 'rss' && $display->getComponent('links')

comment_entity_storage_load

comment_entity_storage_load($entities, $entity_type) Implements hook_entity_storage_load(). See also \Drupal\comment\Plugin\Field\FieldType\CommentItem::propertyDefinitions() File core/modules/comment/comment.module, line 342 Enables users to comment on published content. Code function comment_entity_storage_load($entities, $entity_type) { // Comments can only be attached to content entities, so skip others. if (!\Drupal::entityManager()->getDefinition($entity_type)->isSubclassOf('

comment_entity_predelete

comment_entity_predelete(EntityInterface $entity) Implements hook_entity_predelete(). File core/modules/comment/comment.module, line 384 Enables users to comment on published content. Code function comment_entity_predelete(EntityInterface $entity) { // Entities can have non-numeric IDs, but {comment} and // {comment_entity_statistics} tables have integer columns for entity ID, and // PostgreSQL throws exceptions if you attempt query conditions with // mismatched types. So, we need to

comment_entity_insert

comment_entity_insert(EntityInterface $entity) Implements hook_entity_insert(). File core/modules/comment/comment.module, line 372 Enables users to comment on published content. Code function comment_entity_insert(EntityInterface $entity) { // Allow bulk updates and inserts to temporarily disable the // maintenance of the {comment_entity_statistics} table. if (\Drupal::state()->get('comment.maintain_entity_statistics') && $fields = \Drupal::service('comment.manager')->

comment_entity_extra_field_info

comment_entity_extra_field_info() Implements hook_entity_extra_field_info(). File core/modules/comment/comment.module, line 100 Enables users to comment on published content. Code function comment_entity_extra_field_info() { $return = array(); foreach (CommentType::loadMultiple() as $comment_type) { $return['comment'][$comment_type->id()] = array( 'form' => array( 'author' => array( 'label' => t('Author'), 'description' => t('Author tex

comment_cron

comment_cron() Implements hook_cron(). File core/modules/comment/comment.module, line 477 Enables users to comment on published content. Code function comment_cron() { // Store the maximum possible comments per thread (used for node search // ranking by reply count). \Drupal::state()->set('comment.node_comment_statistics_scale', 1.0 / max(1, \Drupal::service('comment.statistics')->getMaximumCount('node'))); }

COMMENT_ANONYMOUS_MUST_CONTACT

Anonymous posters are required to leave their contact information. File core/modules/comment/comment.module, line 42 Enables users to comment on published content. Code const COMMENT_ANONYMOUS_MUST_CONTACT = 2;

COMMENT_ANONYMOUS_MAY_CONTACT

Anonymous posters may leave their contact information. File core/modules/comment/comment.module, line 37 Enables users to comment on published content. Code const COMMENT_ANONYMOUS_MAY_CONTACT = 1;