You are here

interface ForwardAccessCheckerInterface in Forward 8

Same name and namespace in other branches
  1. 8.3 src/ForwardAccessCheckerInterface.php \Drupal\forward\ForwardAccessCheckerInterface
  2. 8.2 src/ForwardAccessCheckerInterface.php \Drupal\forward\ForwardAccessCheckerInterface

Defines an interface for checking access to Forward link or form display.

Hierarchy

Expanded class hierarchy of ForwardAccessCheckerInterface

All classes that implement ForwardAccessCheckerInterface

5 files declare their use of ForwardAccessCheckerInterface
ForwardForm.php in src/Plugin/DsField/ForwardForm.php
ForwardFormBlock.php in src/Plugin/Block/ForwardFormBlock.php
Contains \Drupal\forward\Plugin\Block\ForwardFormBlock.
ForwardLink.php in src/Plugin/DsField/ForwardLink.php
ForwardLink.php in src/Plugin/views/field/ForwardLink.php
ForwardLinkBlock.php in src/Plugin/Block/ForwardLinkBlock.php
Contains \Drupal\forward\Plugin\Block\ForwardLinkBlock.

File

src/ForwardAccessCheckerInterface.php, line 10

Namespace

Drupal\forward
View source
interface ForwardAccessCheckerInterface {

  /**
   * Checks whether a Forward link or form can be displayed on a given entity and view mode.
   *
   * @param array $settings
   *   Array of settings.
   * @param \Drupal\Core\Entity\EntityInterface $entity
   *   Entity for which the link is being built.
   * @param $view_mode
   *   The view mode to check.
   * @param $entity_type
   *   The entity_type to check if an entity is not available at the time the check needs to occur.
   * @param $bundle
   *   The bundle to check if an entity is not available at the time the check needs to occur.
   *
   * @return boolean
   *   Whether access is allowed or not
   */
  public function isAllowed(array $settings, EntityInterface $entity, $view_mode, $entity_type = NULL, $bundle = NULL);

}

Members

Namesort descending Modifiers Type Description Overrides
ForwardAccessCheckerInterface::isAllowed public function Checks whether a Forward link or form can be displayed on a given entity and view mode. 1