attus / entity_base
Drupal Entity Base Module
Installs: 60
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:drupal-module
Requires
- drupal/core: ^9.2 || ^10.0
This package is auto-updated.
Last update: 2024-05-07 17:32:54 UTC
README
Drupal 9-10 Entity Base Module
Apply for custom Content or Config Entity Types
src\Entity\CustomContenEntity.php:
* @ContentEntityType( * handlers = { * "storage" = "Drupal\entity_base\ContentEntityBaseStorage", * } * )
src\Entity\CustomConfigEntity.php:
* @ConfigEntityType( * handlers = { * "storage" = "Drupal\entity_base\ConfigEntityBaseStorage", * } * )
Load By UUID
$myContentEntity = \Drupal::entityTypeManager()->getStorage('custom_content_entity')->loadByUuid($uuid); $myConfigEntity = \Drupal::entityTypeManager()->getStorage('custom_config_entity')->loadByUuid($uuid);
You are free to use this module without any restriction but without any warranty.