Security update for permissions_by_term
[yaffs-website] / web / modules / contrib / permissions_by_term / modules / permissions_by_entity / src / Service / AccessCheckerInterface.php
diff --git a/web/modules/contrib/permissions_by_term/modules/permissions_by_entity/src/Service/AccessCheckerInterface.php b/web/modules/contrib/permissions_by_term/modules/permissions_by_entity/src/Service/AccessCheckerInterface.php
new file mode 100644 (file)
index 0000000..ec89b28
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+
+namespace Drupal\permissions_by_entity\Service;
+
+use Drupal\Core\Entity\ContentEntityInterface;
+
+/**
+ * Interface AccessCheckerInterface.
+ *
+ * @package Drupal\permissions_by_entity\Service
+ */
+interface AccessCheckerInterface {
+
+  /**
+   * Checks if a user is allowed to access a content entity.
+   *
+   * @param \Drupal\Core\Entity\ContentEntityInterface $entity
+   *   The content entity.
+   * @param bool|int $uid
+   *   (Optional) Defaults to the uid of the current user.
+   *
+   * @return bool TRUE if access is allowed, otherwise FALSE.
+   * TRUE if access is allowed, otherwise FALSE.
+   */
+  public function isAccessAllowed(ContentEntityInterface $entity, $uid = FALSE);
+
+}