/** * Returns HTML to display a help icon. * * Theme developers: DO NOT OVERRIDE! Please override function * {@link core_renderer::render_help_icon()} instead. * * @param string $identifier The keyword that defines a help page * @param string $component component name * @param string|bool $linktext true means use $title as link text, string means link text value * @return string HTML fragment */ public function help_icon($identifier, $component = 'moodle', $linktext = '') { $icon = new help_icon($identifier, $component); $icon->diag_strings(); if ($linktext === true) { $icon->linktext = get_string($icon->identifier, $icon->component); } else if (!empty($linktext)) { $icon->linktext = $linktext; } return $this->render($icon); }
/** * Implementation of user image rendering. * * @param help_icon $helpicon A help icon instance * @return string HTML fragment */ protected function render_help_icon(help_icon $helpicon) { return $this->render_from_template('core/help_icon', $helpicon->export_for_template($this)); }