class EntityTestBundle
Same name and namespace in other branches
- 11.x core/modules/system/tests/modules/entity_test/src/Entity/EntityTestBundle.php \Drupal\entity_test\Entity\EntityTestBundle
- 10 core/modules/system/tests/modules/entity_test/src/Entity/EntityTestBundle.php \Drupal\entity_test\Entity\EntityTestBundle
- 8.9.x core/modules/system/tests/modules/entity_test/src/Entity/EntityTestBundle.php \Drupal\entity_test\Entity\EntityTestBundle
Defines the Test entity bundle configuration entity.
Plugin annotation
@ConfigEntityType(
id = "entity_test_bundle",
label = @Translation("Test entity bundle"),
handlers = {
"access" = "\Drupal\Core\Entity\EntityAccessControlHandler",
"form" = {
"default" = "\Drupal\Core\Entity\BundleEntityFormBase",
},
"route_provider" = {
"html" = "Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider",
},
},
admin_permission = "administer entity_test_bundle content",
config_prefix = "entity_test_bundle",
bundle_of = "entity_test_with_bundle",
entity_keys = {
"id" = "id",
"label" = "label"
},
config_export = {
"id",
"label",
"description",
},
links = {
"add-form" = "/entity_test_bundle/add",
}
)
Hierarchy
- class \Drupal\Core\Entity\EntityBase implements \Drupal\Core\Entity\EntityInterface uses \Drupal\Core\Cache\RefinableCacheableDependencyTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait
- class \Drupal\Core\Config\Entity\ConfigEntityBase implements \Drupal\Core\Config\Entity\ConfigEntityInterface uses \Drupal\Core\Plugin\PluginDependencyTrait, \Drupal\Core\Entity\SynchronizableEntityTrait extends \Drupal\Core\Entity\EntityBase
- class \Drupal\Core\Config\Entity\ConfigEntityBundleBase extends \Drupal\Core\Config\Entity\ConfigEntityBase
- class \Drupal\entity_test\Entity\EntityTestBundle implements \Drupal\Core\Entity\EntityDescriptionInterface extends \Drupal\Core\Config\Entity\ConfigEntityBundleBase
- class \Drupal\Core\Config\Entity\ConfigEntityBundleBase extends \Drupal\Core\Config\Entity\ConfigEntityBase
- class \Drupal\Core\Config\Entity\ConfigEntityBase implements \Drupal\Core\Config\Entity\ConfigEntityInterface uses \Drupal\Core\Plugin\PluginDependencyTrait, \Drupal\Core\Entity\SynchronizableEntityTrait extends \Drupal\Core\Entity\EntityBase
Expanded class hierarchy of EntityTestBundle
13 files declare their use of EntityTestBundle
- BundlePermissionHandlerTraitTest.php in core/
tests/ Drupal/ KernelTests/ Core/ Entity/ BundlePermissionHandlerTraitTest.php - DeleteMultipleFormTest.php in core/
tests/ Drupal/ FunctionalTests/ Entity/ DeleteMultipleFormTest.php - EntityAddUITest.php in core/
modules/ system/ tests/ src/ Functional/ Entity/ EntityAddUITest.php - EntityBaseTest.php in core/
tests/ Drupal/ KernelTests/ Core/ Entity/ EntityBaseTest.php - EntityBundleConditionTest.php in core/
tests/ Drupal/ KernelTests/ Core/ Entity/ EntityBundleConditionTest.php
File
-
core/
modules/ system/ tests/ modules/ entity_test/ src/ Entity/ EntityTestBundle.php, line 40
Namespace
Drupal\entity_test\EntityView source
class EntityTestBundle extends ConfigEntityBundleBase implements EntityDescriptionInterface {
/**
* The machine name.
*
* @var string
*/
protected $id;
/**
* The human-readable name.
*
* @var string
*/
protected $label;
/**
* The description.
*
* @var string
*/
protected $description;
/**
* {@inheritdoc}
*/
public function getDescription() {
return $this->description;
}
/**
* {@inheritdoc}
*/
public function setDescription($description) {
$this->description = $description;
return $this;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.