Skip to content

attus74/entity_base

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Entity Base

Drupal 10 Entity Base Module

Maintenance GitHub license GitHub release GitHub issues

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.