comment_help

comment_help($route_name, RouteMatchInterface $route_match) Implements hook_help(). File core/modules/comment/comment.module, line 58 Enables users to comment on published content. Code function comment_help($route_name, RouteMatchInterface $route_match) { switch ($route_name) { case 'help.page.comment': $output = '<h3>' . t('About') . '</h3>'; $output .= '<p>' . t('The Comment module allows users to comment on site content, set commenting defaults and perm

comment_node_search_result

comment_node_search_result(EntityInterface $node) Implements hook_node_search_result(). Formats a comment count string and returns it, for display with search results. File core/modules/comment/comment.module, line 489 Enables users to comment on published content. Code function comment_node_search_result(EntityInterface $node) { $comment_fields = \Drupal::service('comment.manager')->getFields('node'); $comments = 0; $open = FALSE; foreach ($comment_fields as $field_name => $inf

comment_install

comment_install() Implements hook_install(). File core/modules/comment/comment.install, line 30 Install, update and uninstall functions for the Comment module. Code function comment_install() { // By default, maintain entity statistics for comments. // @see \Drupal\comment\CommentStatisticsInterface \Drupal::state()->set('comment.maintain_entity_statistics', TRUE); }

COMMENT_NEW_LIMIT

The time cutoff for comments marked as read for entity types other node. Comments changed before this time are always marked as read. Comments changed after this time may be marked new, updated, or read, depending on their state for the current user. Defaults to 30 days ago. @todo Remove when https://www.drupal.org/node/1029708 lands. File core/modules/comment/comment.module, line 53 Enables users to comment on published content. Code define('COMMENT_NEW_LIMIT', REQUEST_TIME - 30 * 24 * 60 *

comment_form_field_ui_form_display_overview_form_alter

comment_form_field_ui_form_display_overview_form_alter(&$form, FormStateInterface $form_state) Implements hook_form_FORM_ID_alter(). File core/modules/comment/comment.module, line 308 Enables users to comment on published content. Code function comment_form_field_ui_form_display_overview_form_alter(&$form, FormStateInterface $form_state) { $route_match = \Drupal::routeMatch(); if ($form['#entity_type'] == 'comment' && $route_match->getParameter('commented_entity_type'))

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_form_field_ui_display_overview_form_alter

comment_form_field_ui_display_overview_form_alter(&$form, FormStateInterface $form_state) Implements hook_form_FORM_ID_alter(). File core/modules/comment/comment.module, line 318 Enables users to comment on published content. Code function comment_form_field_ui_display_overview_form_alter(&$form, FormStateInterface $form_state) { $route_match = \Drupal::routeMatch(); if ($form['#entity_type'] == 'comment' && $route_match->getParameter('commented_entity_type')) { $fo

comment_form_field_storage_config_edit_form_alter

comment_form_field_storage_config_edit_form_alter(&$form, FormStateInterface $form_state) Implements hook_form_FORM_ID_alter() for 'field_storage_config_edit_form'. File core/modules/comment/comment.module, line 328 Enables users to comment on published content. Code function comment_form_field_storage_config_edit_form_alter(&$form, FormStateInterface $form_state) { if ($form_state->getFormObject()->getEntity()->getType() == 'comment') { // We only support posting one c

comment_field_config_delete

comment_field_config_delete(FieldConfigInterface $field) Implements hook_ENTITY_TYPE_delete() for 'field_config'. File core/modules/comment/comment.module, line 184 Enables users to comment on published content. Code function comment_field_config_delete(FieldConfigInterface $field) { if ($field->getType() == 'comment') { // Delete all comments that used by the entity bundle. $entity_query = \Drupal::entityQuery('comment'); $entity_query->condition('entity_type', $field->

comment_field_storage_config_insert

comment_field_storage_config_insert(FieldStorageConfigInterface $field_storage) Implements hook_ENTITY_TYPE_insert() for 'field_storage_config'. File core/modules/comment/comment.module, line 171 Enables users to comment on published content. Code function comment_field_storage_config_insert(FieldStorageConfigInterface $field_storage) { if ($field_storage->getType() == 'comment') { // Check that the target entity type uses an integer ID. $entity_type_id = $field_storage->getTa