public function SmsTestEventSubscriber::testExecutionOrder in SMS Framework 2.x
Same name and namespace in other branches
- 8 tests/modules/sms_test/src/EventSubscriber/SmsTestEventSubscriber.php \Drupal\sms_test\EventSubscriber\SmsTestEventSubscriber::testExecutionOrder()
- 2.1.x tests/modules/sms_test/src/EventSubscriber/SmsTestEventSubscriber.php \Drupal\sms_test\EventSubscriber\SmsTestEventSubscriber::testExecutionOrder()
Adds event name to execution order when a message is processed.
Parameters
\Symfony\Component\EventDispatcher\Event $event: The event.
string $eventName: The event name.
File
- tests/
modules/ sms_test/ src/ EventSubscriber/ SmsTestEventSubscriber.php, line 52
Class
- SmsTestEventSubscriber
- Test event subscriber.
Namespace
Drupal\sms_test\EventSubscriberCode
public function testExecutionOrder(Event $event, $eventName) {
$execution_order = \Drupal::state()
->get('sms_test_event_subscriber__execution_order', []);
$execution_order[] = $eventName;
\Drupal::state()
->set('sms_test_event_subscriber__execution_order', $execution_order);
}