Security update for permissions_by_term
[yaffs-website] / web / modules / contrib / permissions_by_term / modules / permissions_by_entity / src / Service / AccessCheckerInterface.php
1 <?php
2
3 namespace Drupal\permissions_by_entity\Service;
4
5 use Drupal\Core\Entity\ContentEntityInterface;
6
7 /**
8  * Interface AccessCheckerInterface.
9  *
10  * @package Drupal\permissions_by_entity\Service
11  */
12 interface AccessCheckerInterface {
13
14   /**
15    * Checks if a user is allowed to access a content entity.
16    *
17    * @param \Drupal\Core\Entity\ContentEntityInterface $entity
18    *   The content entity.
19    * @param bool|int $uid
20    *   (Optional) Defaults to the uid of the current user.
21    *
22    * @return bool TRUE if access is allowed, otherwise FALSE.
23    * TRUE if access is allowed, otherwise FALSE.
24    */
25   public function isAccessAllowed(ContentEntityInterface $entity, $uid = FALSE);
26
27 }