function tour_test_tour_presave

Same name in other branches
  1. 9 core/modules/tour/tests/tour_test/tour_test.module \tour_test_tour_presave()
  2. 8.9.x core/modules/tour/tests/tour_test/tour_test.module \tour_test_tour_presave()
  3. 11.x 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

Code

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

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