comment_field_config_update

comment_field_config_update(FieldConfigInterface $field)

Implements hook_ENTITY_TYPE_update() for 'field_config'.

File

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

Code

1
2
3
4
5
6
7
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::entityManager()->getViewBuilder('comment')->resetCache();
  }
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.