Source code for file /joomla/html/parameter/element.php
Documentation is available at element.php
* @version $Id: element.php 6472 2007-02-03 10:47:26Z pasamio $
* @package Joomla.Framework
* @copyright Copyright (C) 2005 - 2007 Open Source Matters. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
// Check to ensure this file is within the rest of the framework
* The JElement is the base class for all JElement types
* @package Joomla.Framework
* This has to be set in the final
* reference to the object that instantiated the element
* @return string type of the parameter
function render(&$xmlElement, $value, $control_name =
'params')
$name =
$xmlElement->attributes('name');
$label =
$xmlElement->attributes('label');
$descr =
$xmlElement->attributes('description');
//make sure we have a valid label
$label =
$label ?
$label :
$name;
$result[0] =
$this->fetchTooltip($label, $descr, $xmlElement, $control_name, $name);
$result[1] =
$this->fetchElement($name, $value, $xmlElement, $control_name);
function fetchTooltip($label, $description, &$xmlElement, $control_name=
'', $name=
'')
$output =
'<label id="'.
$control_name.
$name.
'-lbl" for="'.
$control_name.
$name.
'"';
$output .=
' class="hasTip" title="'.
JText::_($label).
'::'.
JText::_($description).
'">';
$output .=
JText::_( $label ).
'</label>';
function fetchElement($name, $value, &$xmlElement, $control_name) {