You are here

interface TeamContextManagerInterface in Apigee Edge 8

Base definition of the team context manager service.

Hierarchy

Expanded class hierarchy of TeamContextManagerInterface

All classes that implement TeamContextManagerInterface

3 files declare their use of TeamContextManagerInterface
TeamContextSwitcherBlock.php in modules/apigee_edge_teams/src/Plugin/Block/TeamContextSwitcherBlock.php
TeamContextSwitcherRouteAlterSubscriber.php in modules/apigee_edge_teams/src/Routing/TeamContextSwitcherRouteAlterSubscriber.php
TeamRouteProvider.php in modules/apigee_edge_teams/src/Entity/TeamRouteProvider.php

File

modules/apigee_edge_teams/src/TeamContextManagerInterface.php, line 29

Namespace

Drupal\apigee_edge_teams
View source
interface TeamContextManagerInterface {

  /**
   * The name of the route option for developer.
   */
  const DEVELOPER_ROUTE_OPTION_NAME = '_apigee_developer_route';

  /**
   * The name of the route option for team.
   */
  const TEAM_ROUTE_OPTION_NAME = '_apigee_team_route';

  /**
   * Determines the current context from the route.
   *
   * @return \Drupal\Core\Entity\EntityInterface|null
   *   The current entity or NULL.
   */
  public function getCurrentContextEntity() : ?EntityInterface;

  /**
   * Returns the destination url for the given entity.
   *
   * @param \Drupal\Core\Entity\EntityInterface $entity
   *   The developer or team entity.
   *
   * @return \Drupal\Core\Url|null
   *   The destination URL.
   */
  public function getDestinationUrlForEntity(EntityInterface $entity) : ?Url;

  /**
   * Gets the corresponding route name for the given entity.
   *
   * @param \Drupal\Core\Entity\EntityInterface $entity
   *   The developer or team entity.
   *
   * @return null|string
   *   The corresponding route name if one is detected.
   */
  public function getCorrespondingRouteNameForEntity(EntityInterface $entity) : ?string;

}

Members

Namesort descending Modifiers Type Description Overrides
TeamContextManagerInterface::DEVELOPER_ROUTE_OPTION_NAME constant The name of the route option for developer.
TeamContextManagerInterface::getCorrespondingRouteNameForEntity public function Gets the corresponding route name for the given entity. 1
TeamContextManagerInterface::getCurrentContextEntity public function Determines the current context from the route. 1
TeamContextManagerInterface::getDestinationUrlForEntity public function Returns the destination url for the given entity. 1
TeamContextManagerInterface::TEAM_ROUTE_OPTION_NAME constant The name of the route option for team.