Upgraded drupal core with security updates
[yaffs-website] / web / core / lib / Drupal / Core / Access / AccessibleInterface.php
1 <?php
2
3 namespace Drupal\Core\Access;
4
5 use Drupal\Core\Session\AccountInterface;
6
7 /**
8  * Interface for checking access.
9  *
10  * @ingroup entity_api
11  */
12 interface AccessibleInterface {
13
14   /**
15    * Checks data value access.
16    *
17    * @param string $operation
18    *   The operation to be performed.
19    * @param \Drupal\Core\Session\AccountInterface $account
20    *   (optional) The user for which to check access, or NULL to check access
21    *   for the current user. Defaults to NULL.
22    * @param bool $return_as_object
23    *   (optional) Defaults to FALSE.
24    *
25    * @return bool|\Drupal\Core\Access\AccessResultInterface
26    *   The access result. Returns a boolean if $return_as_object is FALSE (this
27    *   is the default) and otherwise an AccessResultInterface object.
28    *   When a boolean is returned, the result of AccessInterface::isAllowed() is
29    *   returned, i.e. TRUE means access is explicitly allowed, FALSE means
30    *   access is either explicitly forbidden or "no opinion".
31    */
32   public function access($operation, AccountInterface $account = NULL, $return_as_object = FALSE);
33
34 }