3 namespace Drupal\block_content\Access;
6 * Interface for AccessibleInterface objects that have an access dependency.
8 * Objects should implement this interface when their access depends on access
9 * to another object that implements \Drupal\Core\Access\AccessibleInterface.
10 * This interface simply provides the getter method for the access
11 * dependency object. Objects that implement this interface are responsible for
12 * checking access of the access dependency because the dependency may not take
13 * effect in all cases. For instance an entity may only need the access
14 * dependency set when it is embedded within another entity and its access
15 * should be dependent on access to the entity in which it is embedded.
17 * To check the access to the dependency the object implementing this interface
18 * can use code like this:
20 * $accessible->getAccessDependency()->access($op, $account, TRUE);
25 interface DependentAccessInterface {
28 * Gets the access dependency.
30 * @return \Drupal\Core\Access\AccessibleInterface|null
31 * The access dependency or NULL if none has been set.
33 public function getAccessDependency();