You are here

abstract class AppControllerBase in Apigee Edge 8

Base class for all app controller services in Drupal.

Ex. app, developer app, company app.

Hierarchy

Expanded class hierarchy of AppControllerBase

File

src/Entity/Controller/AppControllerBase.php, line 32

Namespace

Drupal\apigee_edge\Entity\Controller
View source
abstract class AppControllerBase implements EntityCacheAwareControllerInterface {

  /**
   * The organization controller service.
   *
   * @var \Drupal\apigee_edge\Entity\Controller\OrganizationControllerInterface
   */
  protected $organizationController;

  /**
   * The SDK connector service.
   *
   * @var \Drupal\apigee_edge\SDKConnectorInterface
   */
  protected $connector;

  /**
   * The app cache.
   *
   * @var \Drupal\apigee_edge\Entity\Controller\Cache\AppCacheInterface
   */
  protected $appCache;

  /**
   * AppControllerBase constructor.
   *
   * @param \Drupal\apigee_edge\SDKConnectorInterface $connector
   *   The SDK connector service.
   * @param \Drupal\apigee_edge\Entity\Controller\OrganizationControllerInterface $org_controller
   *   The organization controller service.
   * @param \Drupal\apigee_edge\Entity\Controller\Cache\AppCacheInterface $app_cache
   *   The app cache.
   */
  public function __construct(SDKConnectorInterface $connector, OrganizationControllerInterface $org_controller, AppCacheInterface $app_cache) {
    $this->connector = $connector;
    $this->organizationController = $org_controller;
    $this->appCache = $app_cache;
  }

  /**
   * {@inheritdoc}
   */
  public function entityCache() : EntityCacheInterface {

    // Developer apps should always expose the app cache as their entity cache
    // because this stores the actual app objects.
    return $this->appCache;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AppControllerBase::$appCache protected property The app cache.
AppControllerBase::$connector protected property The SDK connector service.
AppControllerBase::$organizationController protected property The organization controller service.
AppControllerBase::entityCache public function Returns the entity cache used by the controller. Overrides EntityCacheAwareControllerInterface::entityCache
AppControllerBase::__construct public function AppControllerBase constructor. 2