You are here

function comment_field_config_update in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/comment/comment.module \comment_field_config_update()
  2. 10 core/modules/comment/comment.module \comment_field_config_update()

Implements hook_ENTITY_TYPE_update() for 'field_config'.

File

core/modules/comment/comment.module, line 177
Enables users to comment on published content.

Code

function comment_field_config_update(FieldConfigInterface $field) {
  if ($field
    ->getType() == 'comment') {

    // Comment field settings also affects the rendering of *comment* entities,
    // not only the *commented* entities.
    \Drupal::entityTypeManager()
      ->getViewBuilder('comment')
      ->resetCache();
  }
}