3 namespace Drupal\permissions_by_entity\Service;
5 use Drupal\Core\Entity\ContentEntityInterface;
8 * Interface AccessCheckerInterface.
10 * @package Drupal\permissions_by_entity\Service
12 interface AccessCheckerInterface {
15 * Checks if a user is allowed to access a content entity.
17 * @param \Drupal\Core\Entity\ContentEntityInterface $entity
19 * @param bool|int $uid
20 * (Optional) Defaults to the uid of the current user.
22 * @return bool TRUE if access is allowed, otherwise FALSE.
23 * TRUE if access is allowed, otherwise FALSE.
25 public function isAccessAllowed(ContentEntityInterface $entity, $uid = FALSE);