function 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.