SampleEntityGeneratorInterface.php

Same filename in other branches
  1. 9 core/modules/layout_builder/src/Entity/SampleEntityGeneratorInterface.php
  2. 8.9.x core/modules/layout_builder/src/Entity/SampleEntityGeneratorInterface.php
  3. 10 core/modules/layout_builder/src/Entity/SampleEntityGeneratorInterface.php

Namespace

Drupal\layout_builder\Entity

File

core/modules/layout_builder/src/Entity/SampleEntityGeneratorInterface.php

View source
<?php

namespace Drupal\layout_builder\Entity;


/**
 * Generates a sample entity.
 */
interface SampleEntityGeneratorInterface {
    
    /**
     * Gets a sample entity for a given entity type and bundle.
     *
     * @param string $entity_type_id
     *   The entity type ID.
     * @param string $bundle_id
     *   The bundle ID.
     *
     * @return \Drupal\Core\Entity\EntityInterface
     *   An entity.
     */
    public function get($entity_type_id, $bundle_id);
    
    /**
     * Deletes a sample entity for a given entity type and bundle.
     *
     * @param string $entity_type_id
     *   The entity type ID.
     * @param string $bundle_id
     *   The bundle ID.
     *
     * @return $this
     */
    public function delete($entity_type_id, $bundle_id);

}

Interfaces

Title Deprecated Summary
SampleEntityGeneratorInterface Generates a sample entity.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.