LayoutBuilderSampleEntityGenerator
class LayoutBuilderSampleEntityGenerator implements SampleEntityGeneratorInterface (View source)
Generates a sample entity for use by the Layout Builder.
Properties
| protected SharedTempStoreFactory | $tempStoreFactory | The shared tempstore factory. |
|
| protected EntityTypeManagerInterface | $entityTypeManager | The entity type manager. |
Methods
__construct(SharedTempStoreFactory $temp_store_factory, EntityTypeManagerInterface $entity_type_manager)
LayoutBuilderSampleEntityGenerator constructor.
get(string $entity_type_id, string $bundle_id)
Gets a sample entity for a given entity type and bundle.
$this
delete(string $entity_type_id, string $bundle_id)
Deletes a sample entity for a given entity type and bundle.
Details
__construct(SharedTempStoreFactory $temp_store_factory, EntityTypeManagerInterface $entity_type_manager)
LayoutBuilderSampleEntityGenerator constructor.
EntityInterface
get(string $entity_type_id, string $bundle_id)
Gets a sample entity for a given entity type and bundle.
$this
delete(string $entity_type_id, string $bundle_id)
Deletes a sample entity for a given entity type and bundle.