Source for file chromestyle.php
Documentation is available at chromestyle.php
* @package Joomla.Libraries
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
* Chrome Styles Form Field class for the Joomla Platform.
* @package Joomla.Libraries
public $type =
'ChromeStyle';
* Method to get the list of template chrome style options
* @return array The field option objects as a nested array in groups.
// Add Module Style Field
$tmp =
'---' .
JText::_('JLIB_FORM_VALUE_FROM_TEMPLATE') .
'---';
$groups[$tmp][] =
JHtml::_('select.option', '0', JText::_('JLIB_FORM_VALUE_INHERITED'));
// Create one new option object for each available style, grouped by templates
foreach ($templateStyles as $template =>
$styles)
$groups[$template] =
array();
foreach ($styles as $style)
$tmp =
JHtml::_('select.option', $template .
'-' .
$style, $style);
$groups[$template][] =
$tmp;
* Method to get the templates module styles.
* @return array The array of styles, grouped by templates.
foreach ($templates as $template)
$modulesFilePath =
JPATH_SITE .
'/templates/' .
$template->element .
'/html/modules.php';
// Is there modules.php for that template?
preg_match_all('/function[\s\t]*modChrome\_([a-z0-9\-\_]*)[\s\t]*\(/i', $modulesFileData, $styles);
$moduleStyles[$template->element] =
array();
$moduleStyles[$template->element] =
$styles[1];
* Method to get the system template as an object.
* @return array The object of system template.
$template =
new stdClass;
$template->element =
'system';
$template->name =
'system';
Documentation generated on Tue, 19 Nov 2013 14:55:44 +0100 by phpDocumentor 1.4.3