final class TeamMemberApiProductAccessHandlerCacheReset in Apigee Edge 8
Ensures team member API product access handler's cache gets cleared.
Hierarchy
- class \Drupal\apigee_edge_teams\EventSubscriber\TeamMemberApiProductAccessHandlerCacheReset implements \Symfony\Component\EventDispatcher\EventSubscriberInterface
Expanded class hierarchy of TeamMemberApiProductAccessHandlerCacheReset
1 string reference to 'TeamMemberApiProductAccessHandlerCacheReset'
- apigee_edge_teams.services.yml in modules/
apigee_edge_teams/ apigee_edge_teams.services.yml - modules/apigee_edge_teams/apigee_edge_teams.services.yml
1 service uses TeamMemberApiProductAccessHandlerCacheReset
File
- modules/
apigee_edge_teams/ src/ EventSubscriber/ TeamMemberApiProductAccessHandlerCacheReset.php, line 35
Namespace
Drupal\apigee_edge_teams\EventSubscriberView source
final class TeamMemberApiProductAccessHandlerCacheReset implements EventSubscriberInterface {
/**
* The team member api product access handler.
*
* @var \Drupal\apigee_edge_teams\TeamMemberApiProductAccessHandlerInterface
*/
private $teamMemberApiProductAccessHandler;
/**
* TeamApiProductAccessCacheReset constructor.
*
* @param \Drupal\apigee_edge_teams\TeamMemberApiProductAccessHandlerInterface $team_member_api_product_access_handler
* The team member api product access handler.
*/
public function __construct(TeamMemberApiProductAccessHandlerInterface $team_member_api_product_access_handler) {
$this->teamMemberApiProductAccessHandler = $team_member_api_product_access_handler;
}
/**
* {@inheritdoc}
*/
public static function getSubscribedEvents() {
return [
AppCredentialCreateEvent::EVENT_NAME => 'clearApiProductCache',
AppCredentialGenerateEvent::EVENT_NAME => 'clearApiProductCache',
AppCredentialDeleteEvent::EVENT_NAME => 'clearApiProductCache',
AppCredentialAddApiProductEvent::EVENT_NAME => 'clearApiProductCache',
AppCredentialDeleteApiProductEvent::EVENT_NAME => 'clearApiProductCache',
];
}
/**
* Clears API product entity access cache.
*
* @param \Symfony\Component\EventDispatcher\Event $event
* Event that triggered this subscriber.
*/
public function clearApiProductCache(Event $event) : void {
$this->teamMemberApiProductAccessHandler
->resetCache();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
TeamMemberApiProductAccessHandlerCacheReset:: |
private | property | The team member api product access handler. | |
TeamMemberApiProductAccessHandlerCacheReset:: |
public | function | Clears API product entity access cache. | |
TeamMemberApiProductAccessHandlerCacheReset:: |
public static | function | Returns an array of event names this subscriber wants to listen to. | |
TeamMemberApiProductAccessHandlerCacheReset:: |
public | function | TeamApiProductAccessCacheReset constructor. |