annotate core/modules/block_content/src/Access/RefinableDependentAccessInterface.php @ 5:12f9dff5fda9 tip

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