3 namespace Drupal\permissions_by_term;
5 interface AccessCheckInterface {
8 * Checks if a user can access a node by given node id.
10 public function canUserAccessByNodeId($iNid, $uid = FALSE);
13 * Returns a boolean if the view is containing nodes.
15 public function viewContainsNode($view);
18 * Removes forbidden nodes from view listing.
20 public function removeForbiddenNodesFromView(&$view);
24 * @param bool|int $uid
27 public function isAccessAllowedByDatabase($tid, $uid = FALSE);
30 * Returns a boolean if the term is allowed by given user id.
33 * The taxonomy term id.
38 * Determines by boolean if the given term id is allowed by given user id.
40 public function isTermAllowedByUserId($iTid, $iUid);
43 * Returns a boolean if the term is allowed by given user role id.
47 * @param string $sUserRole
51 * Determines if the term is allowed by the given user role.
53 public function isTermAllowedByUserRole($iTid, $sUserRole);
56 * Gets boolean for set permission on a term.
59 * The taxonomy term id.
62 * Returns either TRUE or FALSE if there is any permission set for the term.
64 public function isAnyPermissionSetForTerm($iTid);