function hook_tour_tips_info_alter

Same name and namespace in other branches
  1. 9 core/modules/tour/tour.api.php \hook_tour_tips_info_alter()
  2. 8.9.x core/modules/tour/tour.api.php \hook_tour_tips_info_alter()
  3. 10 core/modules/tour/tour.api.php \hook_tour_tips_info_alter()

Allow modules to alter tip plugin definitions.

Parameters

array $info: The array of tip plugin definitions, keyed by plugin ID.

See also

\Drupal\tour\Annotation\Tip

Related topics

1 invocation of hook_tour_tips_info_alter()
TipPluginManager::__construct in core/modules/tour/src/TipPluginManager.php
Constructs a new TipPluginManager.

File

core/modules/tour/tour.api.php, line 52

Code

function hook_tour_tips_info_alter(&$info) {
    // Swap out the class used for this tip plugin.
    if (isset($info['text'])) {
        $info['class'] = 'Drupal\\my_module\\Plugin\\tour\\tip\\MyCustomTipPlugin';
    }
}

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