You are here

public function MediaRevisionAccessCheck::__construct in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/media/src/Access/MediaRevisionAccessCheck.php \Drupal\media\Access\MediaRevisionAccessCheck::__construct()

Constructs a new MediaRevisionAccessCheck.

Parameters

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

File

core/modules/media/src/Access/MediaRevisionAccessCheck.php, line 46

Class

MediaRevisionAccessCheck
Provides an access checker for media item revisions.

Namespace

Drupal\media\Access

Code

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