public function LayoutBuilderSampleEntityGenerator::delete in Drupal 10
Same name and namespace in other branches
- 8 core/modules/layout_builder/src/Entity/LayoutBuilderSampleEntityGenerator.php \Drupal\layout_builder\Entity\LayoutBuilderSampleEntityGenerator::delete()
- 9 core/modules/layout_builder/src/Entity/LayoutBuilderSampleEntityGenerator.php \Drupal\layout_builder\Entity\LayoutBuilderSampleEntityGenerator::delete()
Deletes a sample entity for a given entity type and bundle.
Parameters
string $entity_type_id: The entity type ID.
string $bundle_id: The bundle ID.
Return value
$this
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;
}