annotate core/modules/block_content/src/Access/RefinableDependentAccessInterface.php @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents 129ea1e6d783
children
rev   line source
Chris@17 1 <?php
Chris@17 2
Chris@17 3 namespace Drupal\block_content\Access;
Chris@17 4
Chris@17 5 use Drupal\Core\Access\AccessibleInterface;
Chris@17 6
Chris@17 7 /**
Chris@17 8 * An interface to allow adding an access dependency.
Chris@17 9 *
Chris@17 10 * @internal
Chris@17 11 */
Chris@17 12 interface RefinableDependentAccessInterface extends DependentAccessInterface {
Chris@17 13
Chris@17 14 /**
Chris@17 15 * Sets the access dependency.
Chris@17 16 *
Chris@17 17 * If an access dependency is already set this will replace the existing
Chris@17 18 * dependency.
Chris@17 19 *
Chris@17 20 * @param \Drupal\Core\Access\AccessibleInterface $access_dependency
Chris@17 21 * The object upon which access depends.
Chris@17 22 *
Chris@17 23 * @return $this
Chris@17 24 */
Chris@17 25 public function setAccessDependency(AccessibleInterface $access_dependency);
Chris@17 26
Chris@17 27 /**
Chris@17 28 * Adds an access dependency into the existing access dependency.
Chris@17 29 *
Chris@17 30 * If no existing dependency is currently set this will set the dependency
Chris@17 31 * will be set to the new value.
Chris@17 32 *
Chris@17 33 * If there is an existing dependency and it is not an instance of
Chris@17 34 * AccessGroupAnd the dependency will be set as a new AccessGroupAnd
Chris@17 35 * instance with the existing and new dependencies as the members of the
Chris@17 36 * group.
Chris@17 37 *
Chris@17 38 * If there is an existing dependency and it is a instance of AccessGroupAnd
Chris@17 39 * the dependency will be added to the existing access group.
Chris@17 40 *
Chris@17 41 * @param \Drupal\Core\Access\AccessibleInterface $access_dependency
Chris@17 42 * The access dependency to merge.
Chris@17 43 *
Chris@17 44 * @return $this
Chris@17 45 */
Chris@17 46 public function addAccessDependency(AccessibleInterface $access_dependency);
Chris@17 47
Chris@17 48 }