- Issue created by @mariacha1
If you want to use dependency injection within your custom code to use a Contact's custom methods (like loadByUser and loadByEmail), you can't do it. That's because these methods are located on the Contact class instead of the Contact storage class.
Funning:
\Drupal::entityTypeManager()->getStorage('redhen_contact');
Loads this class:
Drupal\Core\Entity\Sql\SqlContentEntityStorage
which doesn't know about the loadBy commands.
There may be other methods missing in the Interface.
The Profile module implements their own custom Storage in order to accomplish this, which we could copy:
https://git.drupalcode.org/project/profile/-/blob/8.x-1.x/src/ProfileSto...
Implement the changes in ProfileStorage
- none -
- none -
- none (I think) -
Active
2.0
Shared