function layout_builder_field_config_insert
Same name in other branches
- 9 core/modules/layout_builder/layout_builder.module \layout_builder_field_config_insert()
- 10 core/modules/layout_builder/layout_builder.module \layout_builder_field_config_insert()
Implements hook_field_config_insert().
File
-
core/
modules/ layout_builder/ layout_builder.module, line 104
Code
function layout_builder_field_config_insert(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.