function TestSubscriber::getStateKey
Computes the state key to use for a given event class.
Parameters
string $event: The event class.
Return value
string The state key under which to store the results for the given event.
File
-
core/
modules/ package_manager/ tests/ modules/ package_manager_test_validation/ src/ EventSubscriber/ TestSubscriber.php, line 115
Class
- TestSubscriber
- Defines an event subscriber for testing validation of Package Manager events.
Namespace
Drupal\package_manager_test_validation\EventSubscriberCode
protected static function getStateKey(string $event) : string {
$key = hash('sha256', static::class . $event);
return static::STATE_KEY . substr($key, 0, 8);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.