3 namespace Drupal\block_content\Access;
5 use Drupal\Core\Access\AccessibleInterface;
8 * An interface to allow adding an access dependency.
12 interface RefinableDependentAccessInterface extends DependentAccessInterface {
15 * Sets the access dependency.
17 * If an access dependency is already set this will replace the existing
20 * @param \Drupal\Core\Access\AccessibleInterface $access_dependency
21 * The object upon which access depends.
25 public function setAccessDependency(AccessibleInterface $access_dependency);
28 * Adds an access dependency into the existing access dependency.
30 * If no existing dependency is currently set this will set the dependency
31 * will be set to the new value.
33 * If there is an existing dependency and it is not an instance of
34 * AccessGroupAnd the dependency will be set as a new AccessGroupAnd
35 * instance with the existing and new dependencies as the members of the
38 * If there is an existing dependency and it is a instance of AccessGroupAnd
39 * the dependency will be added to the existing access group.
41 * @param \Drupal\Core\Access\AccessibleInterface $access_dependency
42 * The access dependency to merge.
46 public function addAccessDependency(AccessibleInterface $access_dependency);