function FileAccessControlHandler::checkCreateAccess
Same name in other branches
- 9 core/modules/file/src/FileAccessControlHandler.php \Drupal\file\FileAccessControlHandler::checkCreateAccess()
- 8.9.x core/modules/file/src/FileAccessControlHandler.php \Drupal\file\FileAccessControlHandler::checkCreateAccess()
- 10 core/modules/file/src/FileAccessControlHandler.php \Drupal\file\FileAccessControlHandler::checkCreateAccess()
Overrides EntityAccessControlHandler::checkCreateAccess
File
-
core/
modules/ file/ src/ FileAccessControlHandler.php, line 130
Class
- FileAccessControlHandler
- Provides a File access control handler.
Namespace
Drupal\fileCode
protected function checkCreateAccess(AccountInterface $account, array $context, $entity_bundle = NULL) {
// The file entity has no "create" permission because by default Drupal core
// does not allow creating file entities independently. It allows you to
// create file entities that are referenced from another entity
// (e.g. an image for an article). A contributed module is free to alter
// this to allow file entities to be created directly.
return AccessResult::neutral();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.