function EntityTestDefinitionSubscriber::storeEvent

Same name in other branches
  1. 8.9.x core/modules/system/tests/modules/entity_test/src/EntityTestDefinitionSubscriber.php \Drupal\entity_test\EntityTestDefinitionSubscriber::storeEvent()
  2. 10 core/modules/system/tests/modules/entity_test/src/EntityTestDefinitionSubscriber.php \Drupal\entity_test\EntityTestDefinitionSubscriber::storeEvent()
  3. 11.x core/modules/system/tests/modules/entity_test/src/EntityTestDefinitionSubscriber.php \Drupal\entity_test\EntityTestDefinitionSubscriber::storeEvent()

Stores the specified event.

Parameters

string $event_name: The event name.

8 calls to EntityTestDefinitionSubscriber::storeEvent()
EntityTestDefinitionSubscriber::onEntityTypeCreate in core/modules/system/tests/modules/entity_test/src/EntityTestDefinitionSubscriber.php
EntityTestDefinitionSubscriber::onEntityTypeDelete in core/modules/system/tests/modules/entity_test/src/EntityTestDefinitionSubscriber.php
EntityTestDefinitionSubscriber::onEntityTypeUpdate in core/modules/system/tests/modules/entity_test/src/EntityTestDefinitionSubscriber.php
EntityTestDefinitionSubscriber::onFieldableEntityTypeCreate in core/modules/system/tests/modules/entity_test/src/EntityTestDefinitionSubscriber.php
EntityTestDefinitionSubscriber::onFieldableEntityTypeUpdate in core/modules/system/tests/modules/entity_test/src/EntityTestDefinitionSubscriber.php

... See full list

File

core/modules/system/tests/modules/entity_test/src/EntityTestDefinitionSubscriber.php, line 244

Class

EntityTestDefinitionSubscriber
Test entity type and field storage definition event subscriber.

Namespace

Drupal\entity_test

Code

protected function storeEvent($event_name) {
    if ($this->trackEvents) {
        $this->state
            ->set($event_name, TRUE);
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.