function LayoutBuilderSampleEntityGenerator::delete

Same name in other branches
  1. 9 core/modules/layout_builder/src/Entity/LayoutBuilderSampleEntityGenerator.php \Drupal\layout_builder\Entity\LayoutBuilderSampleEntityGenerator::delete()
  2. 8.9.x core/modules/layout_builder/src/Entity/LayoutBuilderSampleEntityGenerator.php \Drupal\layout_builder\Entity\LayoutBuilderSampleEntityGenerator::delete()
  3. 11.x core/modules/layout_builder/src/Entity/LayoutBuilderSampleEntityGenerator.php \Drupal\layout_builder\Entity\LayoutBuilderSampleEntityGenerator::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\Entity

Code

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.