/pdf/code/trunk/administrator/components/com_artofpdf/helpers/elements/help.php
PHP | 81 lines | 31 code | 8 blank | 42 comment | 1 complexity | 49a5550e957dcb36fc1f6e98768c7ffc MD5 | raw file
- <?php
- /**
- * @version $Id: help.php 278 2010-09-14 11:11:09Z eddieajau $
- * @package NewLifeInIT
- * @subpackage com_artofpdf
- * @copyright Copyright 2010 New Life in IT Pty Ltd. All rights reserved.
- * @license GNU General Public License version 2 or later.
- * @link http://www.theartofjoomla.com
- */
- // No direct access
- defined('_JEXEC') or die;
- /**
- * This is a JHtml element that displays a help message.
- *
- * @package NewLifeInIT
- * @subpackage com_artofpdf
- * @since 1.0
- */
- class JElementHelp extends JElement
- {
- /**
- * Element name
- */
- public $_name = 'Help';
- /**
- * Fetch the elements.
- *
- * @param string $name The name of the variable.
- * @param string $value The value of the variable.
- * @param object $node The XML node defining the variable.
- * @param string $controlName The name of the HTML control that stores this variable.
- *
- * @return string The HTML representation of the control.
- * @since 1.0
- */
- function fetchElement($name, $value, &$node, $control_name)
- {
- switch ($node->attributes('style'))
- {
- case 'notice':
- $style = 'background: #d2edc9;border: 1px solid #90e772;color: #2b7312;padding: 8px 10px;margin:0;';
- break;
- case 'warning':
- $style = 'background: #FFF3A3;border: 1px solid #E7BD72;color: #B79000;padding: 8px 10px;margin:0;';
- break;
- case 'heading':
- $style = 'font-size:12px;font-weight:bold;color:#fff;background-color:#888;text-align:left;padding: 5px 10px;margin:0;';
- break;
- default:
- $style = 'margin:0; padding: 8px 10px;';
- break;
- }
- return '<div style="'.$style.'">'.
- JText::_($value).
- '</div>';
- }
- /**
- * Fetch the tooltip for the variable label.
- *
- * @param string $label The text for the label.
- * @param string $description The description associated with the label.
- * @param object $xmlElement The XML node defining the variable.
- * @param string $controlName The name of the HTML control that stores this variable (optional).
- * @param string $name The name of the variable (optional).
- *
- * @return string The HTML representation of the label including the tooltip.
- * @since 1.0
- */
- function fetchTooltip($label, $description, &$xmlElement, $control_name='', $name='')
- {
- return false;
- }
- }