Commit 972bed0f authored by alexpott's avatar alexpott

Issue #2009684 by aaronott: Replace theme() with drupal_render() in tour module.

parent 6b098269
...@@ -37,8 +37,13 @@ class TipPluginImage extends TipPluginBase { ...@@ -37,8 +37,13 @@ class TipPluginImage extends TipPluginBase {
* Overrides \Drupal\tour\Plugin\tour\tour\TipPluginInterface::getOutput(). * Overrides \Drupal\tour\Plugin\tour\tour\TipPluginInterface::getOutput().
*/ */
public function getOutput() { public function getOutput() {
$image = array(
'#theme' => 'image',
'#uri' => $this->get('url'),
'#alt' => $this->get('alt'),
);
$output = '<h2 class="tour-tip-label" id="tour-tip-' . $this->get('ariaId') . '-label">' . check_plain($this->get('label')) . '</h2>'; $output = '<h2 class="tour-tip-label" id="tour-tip-' . $this->get('ariaId') . '-label">' . check_plain($this->get('label')) . '</h2>';
$output .= '<p class="tour-tip-image" id="tour-tip-' . $this->get('ariaId') . '-contents">' . theme('image', array('uri' => $this->get('url'), 'alt' => $this->get('alt'))) . '</p>'; $output .= '<p class="tour-tip-image" id="tour-tip-' . $this->get('ariaId') . '-contents">' . drupal_render($image) . '</p>';
return array('#markup' => $output); return array('#markup' => $output);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment