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

Breadcrumb

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

function LayoutBuilderHooks::fieldConfigDelete

Implements hook_field_config_delete().

File

core/modules/layout_builder/src/Hook/LayoutBuilderHooks.php, line 126

Class

LayoutBuilderHooks
Hook implementations for layout_builder.

Namespace

Drupal\layout_builder\Hook

Code

public function fieldConfigDelete(FieldConfigInterface $field_config) {
    // Clear the sample entity for this entity type and bundle.
    $sample_entity_generator = \Drupal::service('layout_builder.sample_entity_generator');
    $sample_entity_generator->delete($field_config->getTargetEntityTypeId(), $field_config->getTargetBundle());
    \Drupal::service('plugin.manager.block')->clearCachedDefinitions();
}

API Navigation

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