Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. CommentHooks.php

function CommentHooks::fieldConfigUpdate

Implements hook_ENTITY_TYPE_update() for 'field_config'.

File

core/modules/comment/src/Hook/CommentHooks.php, line 135

Class

CommentHooks
Hook implementations for comment.

Namespace

Drupal\comment\Hook

Code

public function fieldConfigUpdate(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();
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal