Mercurial > hg > isophonics-drupal-site
view core/modules/tour/tour.api.php @ 13:5fb285c0d0e3
Update Drupal core to 8.4.7 via Composer. Security update; I *think* we've
been lucky to get away with this so far, as we don't support self-registration
which seems to be used by the so-called "drupalgeddon 2" attack that 8.4.5
was vulnerable to.
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:33:26 +0100 |
parents | 4c8ae668cc8c |
children |
line wrap: on
line source
<?php /** * @file * Describes API functions for tour module. */ /** * @addtogroup hooks * @{ */ /** * Allow modules to alter tour items before render. * * @param array $tour_tips * Array of \Drupal\tour\TipPluginInterface items. * @param \Drupal\Core\Entity\EntityInterface $entity * The tour which contains the $tour_tips. */ function hook_tour_tips_alter(array &$tour_tips, Drupal\Core\Entity\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'); } } } /** * Allow modules to alter tip plugin definitions. * * @param array $info * The array of tip plugin definitions, keyed by plugin ID. * * @see \Drupal\tour\Annotation\Tip */ 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'; } } /** * @} End of "addtogroup hooks". */