Shawn Duncan, Technical Architect
Digital Pulp
abstract class ContentEntityBase extends Entity implements \IteratorAggregate,
ContentEntityInterface
abstract class ConfigEntityBase extends Entity implements ConfigEntityInterface
::generateSampleValue
on the field class to get structure.
drupal generate:module
drupal generate:entity:content
drupal generate:entity:config
/src
directory.
ContentEntityInterface
EntityChangedInterface
EntityOwnerInterface
/src/Entity/
ContentEntityBase
@ContentEntityType
Annotations
\Drupal\Core\Entity\EntityType
for all possible properties
/src
for any overrides.
/src/Entity/
@ContentEntityType
Annotations continued...
permissions.yml
file.
baseFieldDefinitions
Drupal\Core\Entity\FieldableEntityInterface
.
Note that entities can have base fields without being designated fieldable.EntityListBuilder
. Add a list_builder
annotation.permissions.yml
file.)routing.yml
file is not needed if you implement a route provider. https://www.drupal.org/node/2593577 ConfigEntityInterface
& ConfigEntityBase
config/schema/module_name.schema.yml
file. This defines the schema for yaml files used to export the entity.schema.yml