annotate core/lib/Drupal/Core/Access/AccessibleInterface.php @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents 4c8ae668cc8c
children
rev   line source
Chris@0 1 <?php
Chris@0 2
Chris@0 3 namespace Drupal\Core\Access;
Chris@0 4
Chris@0 5 use Drupal\Core\Session\AccountInterface;
Chris@0 6
Chris@0 7 /**
Chris@0 8 * Interface for checking access.
Chris@0 9 *
Chris@0 10 * @ingroup entity_api
Chris@0 11 */
Chris@0 12 interface AccessibleInterface {
Chris@0 13
Chris@0 14 /**
Chris@0 15 * Checks data value access.
Chris@0 16 *
Chris@0 17 * @param string $operation
Chris@0 18 * The operation to be performed.
Chris@0 19 * @param \Drupal\Core\Session\AccountInterface $account
Chris@0 20 * (optional) The user for which to check access, or NULL to check access
Chris@0 21 * for the current user. Defaults to NULL.
Chris@0 22 * @param bool $return_as_object
Chris@0 23 * (optional) Defaults to FALSE.
Chris@0 24 *
Chris@0 25 * @return bool|\Drupal\Core\Access\AccessResultInterface
Chris@0 26 * The access result. Returns a boolean if $return_as_object is FALSE (this
Chris@0 27 * is the default) and otherwise an AccessResultInterface object.
Chris@0 28 * When a boolean is returned, the result of AccessInterface::isAllowed() is
Chris@0 29 * returned, i.e. TRUE means access is explicitly allowed, FALSE means
Chris@0 30 * access is either explicitly forbidden or "no opinion".
Chris@0 31 */
Chris@0 32 public function access($operation, AccountInterface $account = NULL, $return_as_object = FALSE);
Chris@0 33
Chris@0 34 }