You are here

class AppCredentialDeleteApiProductEvent in Apigee Edge 8

Triggered after an API product have been removed from an app credential.

Hierarchy

Expanded class hierarchy of AppCredentialDeleteApiProductEvent

4 files declare their use of AppCredentialDeleteApiProductEvent
ApiProductEntityAccessCacheReset.php in src/EventSubscriber/ApiProductEntityAccessCacheReset.php
AppCredentialControllerBase.php in src/Entity/Controller/AppCredentialControllerBase.php
AppCredentialEventSubscriber.php in modules/apigee_edge_actions/src/EventSubscriber/AppCredentialEventSubscriber.php
TeamMemberApiProductAccessHandlerCacheReset.php in modules/apigee_edge_teams/src/EventSubscriber/TeamMemberApiProductAccessHandlerCacheReset.php

File

src/Event/AppCredentialDeleteApiProductEvent.php, line 28

Namespace

Drupal\apigee_edge\Event
View source
class AppCredentialDeleteApiProductEvent extends AbstractAppCredentialEvent {

  /**
   * Event id.
   *
   * @var string
   */
  const EVENT_NAME = 'apigee_edge.app_credential.delete_api_product';

  /**
   * Name of the API product that has been removed.
   *
   * @var string
   */
  private $apiProduct;

  /**
   * AppCredentialDeleteApiProductEvent constructor.
   *
   * @param string $app_type
   *   Either company or developer.
   * @param string $owner_id
   *   Company name or developer id (email) depending on the appType.
   * @param string $app_name
   *   Name of the app.
   * @param \Apigee\Edge\Api\Management\Entity\AppCredentialInterface $credential
   *   The app credential that has been created.
   * @param string $api_product
   *   Name of the API product that has been removed.
   */
  public function __construct(string $app_type, string $owner_id, string $app_name, AppCredentialInterface $credential, string $api_product) {
    parent::__construct($app_type, $owner_id, $app_name, $credential);
    $this->apiProduct = $api_product;
  }

  /**
   * Returns name of the API product that has been removed.
   *
   * @return string
   *   Name of the API product.
   */
  public function getApiProduct() : string {
    return $this->apiProduct;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AbstractAppCredentialEvent::$appName private property Name of the app.
AbstractAppCredentialEvent::$appType private property Type of the app.
AbstractAppCredentialEvent::$credential private property App credential.
AbstractAppCredentialEvent::$ownerId private property ID of the app owner.
AbstractAppCredentialEvent::APP_TYPE_DEVELOPER constant Developer app type.
AbstractAppCredentialEvent::APP_TYPE_TEAM constant Team app type.
AbstractAppCredentialEvent::getAppName public function Returns the name of the app.
AbstractAppCredentialEvent::getAppType public function Returns the app type which is either "company" or "developer".
AbstractAppCredentialEvent::getCredential public function Returns the app credential.
AbstractAppCredentialEvent::getOwnerId public function Returns owner id which is either a company name or a developer id (email).
AppCredentialDeleteApiProductEvent::$apiProduct private property Name of the API product that has been removed.
AppCredentialDeleteApiProductEvent::EVENT_NAME constant Event id.
AppCredentialDeleteApiProductEvent::getApiProduct public function Returns name of the API product that has been removed.
AppCredentialDeleteApiProductEvent::__construct public function AppCredentialDeleteApiProductEvent constructor. Overrides AbstractAppCredentialEvent::__construct