Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By jmsosso on
Hi.
I work with my own entities created in code with hook_entity_info(). I have a base class, that inherits from Entity, common with all my entities. I also want that the user entity inherits from my base class.
function webappm_entity_info_alter(&$entity_info) {
$entity_info['user']['entity class'] = '\Drupal\webappm\Entity\BaseEntity';
}
But when I load an user entity with entity_load() it class is stdClass as usual.
I'm doing something wrong or it isn't possible to do this?
Best regards.