function MediaLibraryOpenerInterface::checkAccess
Same name in other branches
- 8.9.x core/modules/media_library/src/MediaLibraryOpenerInterface.php \Drupal\media_library\MediaLibraryOpenerInterface::checkAccess()
- 10 core/modules/media_library/src/MediaLibraryOpenerInterface.php \Drupal\media_library\MediaLibraryOpenerInterface::checkAccess()
- 11.x 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_libraryCode
public function checkAccess(MediaLibraryState $state, AccountInterface $account);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.