Currently the overrides for entity storage replaces instances of \Drupal::entityTypeManager()->getStorage('')
, but that does not work when using dependency injection to get the Entity Type Manager.
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\taxonomy\TermStorageInterface;
class Foo {
protected TermStorageInterface $termStorage;
public function __construct(
EntityTypeManagerInterface $entityTypeManager,
) {
// PhpStorm will complain that this is an EntityStorageInterface.
$this->termStorage = $entityTypeManager->getStorage('taxonomy_term');
}
}
Replace the override with the interface Drupal\Core\Entity\EntityTypeManagerInterface
.
Active
1.0
Code