You are here

function tour_test_tour_presave in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/tour/tests/tour_test/tour_test.module \tour_test_tour_presave()

Implements hook_ENTITY_TYPE_presave() for tour.

File

core/modules/tour/tests/tour_test/tour_test.module, line 22
Provides tests for tour module.

Code

function tour_test_tour_presave($entity) {
  if ($entity
    ->id() == 'tour-entity-create-test-en') {
    $entity
      ->set('label', $entity
      ->label() . ' alter');
  }
}