| Current Path : /home/juvelize/www/modules/mod_ariextmenu/mod_ariextmenu/fields/ |
| Current File : /home/juvelize/www/modules/mod_ariextmenu/mod_ariextmenu/fields/header.php |
<?php
/*
* ARI Framework Lite
*
* @package ARI Framework Lite
* @version 1.0.0
* @author ARI Soft
* @copyright Copyright (c) 2009 www.ari-soft.com. All rights reserved
* @license GNU/GPL (http://www.gnu.org/copyleft/gpl.html)
*
*/
defined('_JEXEC') or die ('Restricted access');
jimport('joomla.html.html');
jimport('joomla.form.formfield');
class JFormFieldHeader extends JFormField
{
protected $type = 'Header';
function getInput()
{
return $this->fetchElement($this->element['name'], $this->value, $this->element, $this->name);
}
function fetchElement($name, $value, &$node, $control_name)
{
$color = (string)$node['color'] ? (string)$node['color'] : '#FFF';
$bgColor = (string)$node['bgcolor'] ? (string)$node['bgcolor'] : '#7CC4FF';
$options = array(JText::_($value));
foreach ($node->children() as $option)
{
$options[] = $option->data();
}
return sprintf('<div style="float: left; width: 100%%; font-weight: bold; font-size: 120%%; color: ' . $color . '; background-color: ' . $bgColor . '; padding: 2px 0; text-align: center;">%s</div>', call_user_func_array('sprintf', $options));
}
}
?>