You are here

public function AssetMediaFactory::__construct in Media: Acquia DAM 8

AssetMediaFactory constructor.

Parameters

\Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager: Entity Type Manager service.

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

\Drupal\Component\Plugin\Exception\PluginNotFoundException

File

src/Service/AssetMediaFactory.php, line 49

Class

AssetMediaFactory
Class AssetMediaFactory.

Namespace

Drupal\media_acquiadam\Service

Code

public function __construct(EntityTypeManagerInterface $entityTypeManager) {
  $this->entityTypeManager = $entityTypeManager;
  $this->mediaStorage = $this->entityTypeManager
    ->getStorage('media');
}