diff --git a/core/modules/views/views.module b/core/modules/views/views.module index 25c62f8..303cc90 100644 --- a/core/modules/views/views.module +++ b/core/modules/views/views.module @@ -23,7 +23,7 @@ use Drupal\Component\Plugin\Exception\PluginException; use Drupal\views\Entity\View; use Drupal\views\Views; -use Drupal\field\FieldConfigInterface; +use Drupal\Core\Entity\EntityInterface; /** * Implements hook_help(). @@ -459,23 +459,32 @@ function views_add_contextual_links(&$render_element, $location, ViewExecutable } /** - * Implements hook_ENTITY_TYPE_create() for 'field_config'. + * Implements hook_entity_create(). */ -function views_field_config_create(FieldConfigInterface $field) { +function views_entity_create(EntityInterface $entity) { + if ($entity->getEntityTypeId() !== 'field_config' && $entity->getEntityTypeId() !== 'base_field_override') { + return; + } Views::viewsData()->clear(); } /** - * Implements hook_ENTITY_TYPE_update() for 'field_config'. + * Implements hook_entity_update(). */ -function views_field_config_update(FieldConfigInterface $field) { +function views_entity_update(EntityInterface $entity) { + if ($entity->getEntityTypeId() !== 'field_config' && $entity->getEntityTypeId() !== 'base_field_override') { + return; + } Views::viewsData()->clear(); } /** - * Implements hook_ENTITY_TYPE_delete() for 'field_config'. + * Implements hook_entity_delete(). */ -function views_field_config_delete(FieldConfigInterface $field) { +function views_entity_delete(EntityInterface $entity) { + if ($entity->getEntityTypeId() !== 'field_config' && $entity->getEntityTypeId() !== 'base_field_override') { + return; + } Views::viewsData()->clear(); }