You are here

public function MediaLibraryOpenerInterface::checkAccess in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/media_library/src/MediaLibraryOpenerInterface.php \Drupal\media_library\MediaLibraryOpenerInterface::checkAccess()

Checks media library access.

Parameters

\Drupal\media_library\MediaLibraryState $state: The media library.

\Drupal\Core\Session\AccountInterface $account: The user for which to check access.

Return value

\Drupal\Core\Access\AccessResultInterface The access result.

See also

https://www.drupal.org/project/drupal/issues/3038254

2 methods override MediaLibraryOpenerInterface::checkAccess()
MediaLibraryEditorOpener::checkAccess in core/modules/media_library/src/MediaLibraryEditorOpener.php
Checks media library access.
MediaLibraryFieldWidgetOpener::checkAccess in core/modules/media_library/src/MediaLibraryFieldWidgetOpener.php
Checks media library access.

File

core/modules/media_library/src/MediaLibraryOpenerInterface.php, line 37

Class

MediaLibraryOpenerInterface
Defines an interface for media library openers.

Namespace

Drupal\media_library

Code

public function checkAccess(MediaLibraryState $state, AccountInterface $account);