public function CreateDeleteAppKey::onAppKeyCreateDelete in Apigee Edge 8
Creates a states entry when a dev. app credential is created or deleted.
Parameters
\Drupal\apigee_edge\Event\AppCredentialDeleteEvent|\Drupal\apigee_edge\Event\AppCredentialCreateEvent $event: The developer app credential create or delete event.
File
- tests/
modules/ apigee_edge_test_app_keys/ src/ EventSubscriber/ CreateDeleteAppKey.php, line 77
Class
- CreateDeleteAppKey
- Developer app credential create/delete event subscriber.
Namespace
Drupal\apigee_edge_test_app_keys\EventSubscriberCode
public function onAppKeyCreateDelete($event) {
$this->state
->set(static::generateStateKey($event
->getAppType(), $event
->getOwnerId(), $event
->getAppName(), $event
->getCredential()
->id()), $this->time
->getCurrentTime());
}