function tour_test_tour_tips_alter

Same name and namespace in other branches
  1. 9 core/modules/tour/tests/tour_test/tour_test.module \tour_test_tour_tips_alter()
  2. 8.9.x core/modules/tour/tests/tour_test/tour_test.module \tour_test_tour_tips_alter()
  3. 11.x core/modules/tour/tests/tour_test/tour_test.module \tour_test_tour_tips_alter()

Implements hook_tour_tips_alter().

File

core/modules/tour/tests/tour_test/tour_test.module, line 31

Code

function tour_test_tour_tips_alter(array &$tour_tips, EntityInterface $entity) {
  foreach ($tour_tips as $tour_tip) {
    if ($tour_tip->get('id') == 'tour-code-test-1') {
      $tour_tip->set('body', 'Altered by hook_tour_tips_alter');
    }
  }
}

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