class AppCredentialAddApiProductEvent in Apigee Edge 8
Triggered when new API products have been added to an app credential.
Hierarchy
- class \Drupal\apigee_edge\Event\AbstractAppCredentialEvent extends \Symfony\Component\EventDispatcher\Event
- class \Drupal\apigee_edge\Event\AppCredentialAddApiProductEvent
 
 
Expanded class hierarchy of AppCredentialAddApiProductEvent
4 files declare their use of AppCredentialAddApiProductEvent
- 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/ AppCredentialAddApiProductEvent.php, line 28  
Namespace
Drupal\apigee_edge\EventView source
class AppCredentialAddApiProductEvent extends AbstractAppCredentialEvent {
  /**
   * Event id.
   *
   * @var string
   */
  const EVENT_NAME = 'apigee_edge.app_credential.add_api_product';
  /**
   * Array of recently added API product names.
   *
   * @var string[]
   */
  private $newProducts;
  /**
   * AppCredentialAddApiProductEvent 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 array $new_products
   *   Array of API product names that has just been added to the key.
   */
  public function __construct(string $app_type, string $owner_id, string $app_name, AppCredentialInterface $credential, array $new_products) {
    parent::__construct($app_type, $owner_id, $app_name, $credential);
    $this->newProducts = $new_products;
  }
  /**
   * Returns new API products added to the credential.
   *
   * @return string[]
   *   Array of API product names.
   */
  public function getNewProducts() : array {
    return $this->newProducts;
  }
}Members
| 
            Name | 
                  Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| 
            AbstractAppCredentialEvent:: | 
                  private | property | Name of the app. | |
| 
            AbstractAppCredentialEvent:: | 
                  private | property | Type of the app. | |
| 
            AbstractAppCredentialEvent:: | 
                  private | property | App credential. | |
| 
            AbstractAppCredentialEvent:: | 
                  private | property | ID of the app owner. | |
| 
            AbstractAppCredentialEvent:: | 
                  constant | Developer app type. | ||
| 
            AbstractAppCredentialEvent:: | 
                  constant | Team app type. | ||
| 
            AbstractAppCredentialEvent:: | 
                  public | function | Returns the name of the app. | |
| 
            AbstractAppCredentialEvent:: | 
                  public | function | Returns the app type which is either "company" or "developer". | |
| 
            AbstractAppCredentialEvent:: | 
                  public | function | Returns the app credential. | |
| 
            AbstractAppCredentialEvent:: | 
                  public | function | Returns owner id which is either a company name or a developer id (email). | |
| 
            AppCredentialAddApiProductEvent:: | 
                  private | property | Array of recently added API product names. | |
| 
            AppCredentialAddApiProductEvent:: | 
                  constant | Event id. | ||
| 
            AppCredentialAddApiProductEvent:: | 
                  public | function | Returns new API products added to the credential. | |
| 
            AppCredentialAddApiProductEvent:: | 
                  public | function | 
            AppCredentialAddApiProductEvent constructor. Overrides AbstractAppCredentialEvent:: |