Skip to content

Latest commit

 

History

History
37 lines (29 loc) · 1.26 KB

README.md

File metadata and controls

37 lines (29 loc) · 1.26 KB

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.