* @copyright Copyright (C) 2007 - 2016 Prieco, S.A. All rights reserved.
* @license http://http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
* @link http://www.extly.com http://support.extly.com
*/
// No direct access
defined('_JEXEC') or die('Restricted access');
jimport('joomla.html.html');
/**
* Utility class for all HTML drawing classes
*
* @package Extly.Library
* @subpackage HTML
* @since 11.1
*/
abstract class EHtml extends JHtml
{
/**
* Compute the files to be included
*
* @param string $folder folder name to search into (images, css, js, ...)
* @param string $file path to file
* @param boolean $relative path to file is relative to /media folder
* @param boolean $path_only param
* @param boolean $detect_browser detect browser to include specific browser files
* @param boolean $detect_debug detect debug to include compressed files if debug is on
*
* @return array files to be included
*
* @see JBrowser
* @since 11.1
*/
public static function getRelativeFiles($folder, $file, $relative = true, $path_only = false, $detect_browser = false, $detect_debug = true)
{
return self::includeRelativeFiles($folder, $file, $relative, $detect_browser, $detect_debug);
}
/**
* Compute the files to be included
*
* @param string $folder folder name to search into (images, css, js, ...)
* @param string $file path to file
* @param boolean $relative path to file is relative to /media folder
* @param boolean $path_only param
* @param boolean $detect_browser detect browser to include specific browser files
* @param boolean $detect_debug detect debug to include compressed files if debug is on
*
* @return array files to be included
*
* @see JBrowser
* @since 11.1
*/
public static function getRelativeFile($folder, $file, $relative = true, $path_only = false, $detect_browser = false, $detect_debug = true)
{
$app = null;
$includes = self::includeRelativeFiles($folder, $file, $relative, $detect_browser, $detect_debug);
if (count($includes) > 0)
{
$app = $includes[0];
}
return $app;
}
/**
* generateIdTag
*
* @return string
*/
public static function generateIdTag()
{
$idTag = 'id' . rand(1, 10000);
$idTag = 'xtform' . $idTag;
return $idTag;
}
/**
* genericControl.
*
* @param string $label Label
* @param string $desc Description
* @param array $name Control name
* @param string $control Params
* @param string $control_class Params
*
* @return string HTML
*/
public static function genericControl($label, $desc, $name = null, $control = null, $control_class = null)
{
return "
" . $control . "
";
}
/**
* label.
*
* @param string $label Label
* @param string $desc Description
* @param array $name Control name
*
* @return string HTML
*/
public static function label($label, $desc, $name = null)
{
$for = '';
if ($name)
{
$for = 'for=\"' . $name . '\" ';
}
return "";
}
/**
* textControl.
*
* @param string $selected Value
* @param string $name The name for the field
* @param string $label Label
* @param string $desc Description
* @param array $idTag Additional HTML attributes for the