public function EntityUsageTest::usageBulkTargetDeleteEventRecorder in Entity Usage 8
Same name and namespace in other branches
- 8.4 tests/src/Kernel/EntityUsageTest.php \Drupal\Tests\entity_usage\Kernel\EntityUsageTest::usageBulkTargetDeleteEventRecorder()
- 8.2 tests/src/Kernel/EntityUsageTest.php \Drupal\Tests\entity_usage\Kernel\EntityUsageTest::usageBulkTargetDeleteEventRecorder()
- 8.3 tests/src/Kernel/EntityUsageTest.php \Drupal\Tests\entity_usage\Kernel\EntityUsageTest::usageBulkTargetDeleteEventRecorder()
Reacts to bulk target delete event.
Parameters
\Drupal\entity_usage\Events\EntityUsageEvent $event: The entity usage event.
string $name: The name of the event.
File
- tests/
src/ Kernel/ EntityUsageTest.php, line 396
Class
- EntityUsageTest
- Tests the basic API operations of our tracking service..
Namespace
Drupal\Tests\entity_usage\KernelCode
public function usageBulkTargetDeleteEventRecorder(EntityUsageEvent $event, $name) {
$this->state
->set('entity_usage_events_test.usage_bulk_target_delete', [
'event_name' => $name,
'target_id' => $event
->getTargetEntityId(),
'target_type' => $event
->getTargetEntityType(),
'referencing_id' => $event
->getReferencingEntityId(),
'referencing_type' => $event
->getReferencingEntityType(),
'method' => $event
->getReferencingMethod(),
'count' => $event
->getCount(),
]);
}