本文整理汇总了PHP中JemHelper::retrieveCss方法的典型用法代码示例。如果您正苦于以下问题:PHP JemHelper::retrieveCss方法的具体用法?PHP JemHelper::retrieveCss怎么用?PHP JemHelper::retrieveCss使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JemHelper
的用法示例。
在下文中一共展示了JemHelper::retrieveCss方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getFiles
/**
* Method to get a list of all the files to edit in a template.
*
* @return array A nested array of relevant files.
*
*/
public function getFiles()
{
// Initialise variables.
$result = array();
jimport('joomla.filesystem.folder');
$path = JPath::clean(JPATH_ROOT . '/media/com_jem/');
// Check if the template path exists.
if (is_dir($path)) {
// Handle the CSS files.
$files = JFolder::files($path . '/css', '\\.css$', false, false);
foreach ($files as $file) {
$result['css'][] = $this->getFile($path . '/css/', $file);
}
} else {
$this->setError(JText::_('COM_JEM_CSSMANAGER_ERROR_CSS_FOLDER_NOT_FOUND'));
return false;
}
# define array with custom css files
$settings = JemHelper::retrieveCss();
$custom = array();
$custom[] = $settings->get('css_backend_customfile');
$custom[] = $settings->get('css_calendar_customfile');
$custom[] = $settings->get('css_colorpicker_customfile');
$custom[] = $settings->get('css_geostyle_customfile');
$custom[] = $settings->get('css_googlemap_customfile');
$custom[] = $settings->get('css_jem_customfile');
$custom[] = $settings->get('css_print_customfile');
foreach ($custom as $cfile) {
if ($cfile) {
$rf = $this->getCustomFile(JPATH_SITE . '/', $cfile);
if ($rf->exists && $rf->ext) {
$result['custom'][] = $rf;
}
}
}
return $result;
}