comment_uri

comment_uri(CommentInterface $comment) Entity URI callback. File core/modules/comment/comment.module, line 87 Enables users to comment on published content. Code function comment_uri(CommentInterface $comment) { return new Url( 'entity.comment.canonical', array( 'comment' => $comment->id(), ), array('fragment' => 'comment-' . $comment->id()) ); }

comment_uninstall

comment_uninstall() Implements hook_uninstall(). File core/modules/comment/comment.install, line 16 Install, update and uninstall functions for the Comment module. Code function comment_uninstall() { // Remove the comment fields. $fields = entity_load_multiple_by_properties('field_storage_config', array('type' => 'comment')); foreach ($fields as $field) { $field->delete(); } // Remove state setting. \Drupal::state()->delete('comment.node_comment_statistics_scale'); }

comment_preprocess_block

comment_preprocess_block(&$variables) Implements hook_preprocess_HOOK() for block templates. File core/modules/comment/comment.module, line 605 Enables users to comment on published content. Code function comment_preprocess_block(&$variables) { if ($variables['configuration']['provider'] == 'comment') { $variables['attributes']['role'] = 'navigation'; } }

comment_node_update_index

comment_node_update_index(EntityInterface $node) Implements hook_node_update_index(). File core/modules/comment/comment.module, line 425 Enables users to comment on published content. Code function comment_node_update_index(EntityInterface $node) { $index_comments = &drupal_static(__FUNCTION__); if ($index_comments === NULL) { // Do not index in the following three cases: // 1. 'Authenticated user' can search content but can't access comments. // 2. 'Anonymous user' can s

comment_preprocess_field

comment_preprocess_field(&$variables) Prepares variables for comment field templates. Default template: field--comment.html.twig. @todo Rename to template_preprocess_field__comment() once https://www.drupal.org/node/939462 is resolved. Parameters array $variables: An associative array containing: element: An associative array containing render arrays for the list of comments, and the comment form. Array keys: comments, comment_form. File core/modules/comment/comment.module, line 738 Ena

comment_preview

comment_preview(CommentInterface $comment, FormStateInterface $form_state) Generates a comment preview. Parameters \Drupal\comment\CommentInterface $comment: The comment entity to preview. Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. Return value array An array as expected by drupal_render(). File core/modules/comment/comment.module, line 561 Enables users to comment on published content. Code function comment_preview(CommentInterface $comment, FormStateIn

comment_ranking

comment_ranking() Implements hook_ranking(). File core/modules/comment/comment.module, line 757 Enables users to comment on published content. Code function comment_ranking() { return \Drupal::service('comment.statistics')->getRankingInfo(); }

comment_node_view_alter

comment_node_view_alter(array &$build, EntityInterface $node, EntityViewDisplayInterface $display) Implements hook_ENTITY_TYPE_view_alter() for node entities. File core/modules/comment/comment.module, line 237 Enables users to comment on published content. Code function comment_node_view_alter(array &$build, EntityInterface $node, EntityViewDisplayInterface $display) { if (\Drupal::moduleHandler()->moduleExists('history')) { $build['#attributes']['data-history-node-id'] = $no

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_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'))