hook_tour_tips_info_alter

hook_tour_tips_info_alter(&$info)

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

Hooks
Define functions that alter the behavior of Drupal core.

File

core/modules/tour/tour.api.php, line 37
Describes API functions for tour module.

Code

function hook_tour_tips_info_alter(&$info) {
  // Swap out the class used for this tip plugin.
  if (isset($info['text'])) {
    $info['class'] = 'Drupal\mymodule\Plugin\tour\tip\MyCustomTipPlugin';
  }
}
doc_Drupal
2016-10-29 09:18:34
Comments
Leave a Comment

Please login to continue.