function layout_builder_field_config_delete

Same name and namespace in other branches
  1. 8.9.x core/modules/layout_builder/layout_builder.module \layout_builder_field_config_delete()
  2. 10 core/modules/layout_builder/layout_builder.module \layout_builder_field_config_delete()
  3. 11.x core/modules/layout_builder/layout_builder.module \layout_builder_field_config_delete()

Implements hook_field_config_delete().

File

core/modules/layout_builder/layout_builder.module, line 113

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.