On this page
function 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 159
- 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::entityManager()->getViewBuilder('comment')->resetCache();
}
}
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!comment!comment.module/function/comment_field_config_update/8.1.x