1 <?php
defined('SYSPATH') OR die('No direct access allowed.');
3 * Help class to provide links to render help texts
8 * Render the help text calls to fetch
9 * translated help texts vis ajax calls.
12 * Entering <?php help::render('edit'); ?> somewhere on a page (view) will
13 * create a clickable icon that fetches the help text from the current
16 * By adding a second parameter to the call:
17 * <?php help::render('edit', 'extinfo'); ?> the information is instead
18 * fetched from the extinfo controller.
20 public static function render($key=false, $controller=false)
26 $img_path = url
::base(false).'application/views/icons/12x12/help.png';
28 $controller = !empty($controller) ?
$controller : Router
::$controller;
30 return '<a class="helptext_target" style="border:0" data-helptext-controller="'.$controller.'" data-helptext-key="'.$key.'" href="#">'.
31 '<img src="'.$img_path.'" alt="'._('Click for help').'" style="width: 12px; height: 12px; margin-bottom: -1px" /></a>';