function LayoutBuilderSampleEntityGenerator::delete
Same name in other branches
- 8.9.x core/modules/layout_builder/src/Entity/LayoutBuilderSampleEntityGenerator.php \Drupal\layout_builder\Entity\LayoutBuilderSampleEntityGenerator::delete()
- 10 core/modules/layout_builder/src/Entity/LayoutBuilderSampleEntityGenerator.php \Drupal\layout_builder\Entity\LayoutBuilderSampleEntityGenerator::delete()
- 11.x core/modules/layout_builder/src/Entity/LayoutBuilderSampleEntityGenerator.php \Drupal\layout_builder\Entity\LayoutBuilderSampleEntityGenerator::delete()
Overrides SampleEntityGeneratorInterface::delete
File
-
core/
modules/ layout_builder/ src/ Entity/ LayoutBuilderSampleEntityGenerator.php, line 65
Class
- LayoutBuilderSampleEntityGenerator
- Generates a sample entity for use by the Layout Builder.
Namespace
Drupal\layout_builder\EntityCode
public function delete($entity_type_id, $bundle_id) {
$tempstore = $this->tempStoreFactory
->get('layout_builder.sample_entity');
$tempstore->delete("{$entity_type_id}.{$bundle_id}");
return $this;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.