本文整理汇总了PHP中gpOutput::CombineFiles方法的典型用法代码示例。如果您正苦于以下问题:PHP gpOutput::CombineFiles方法的具体用法?PHP gpOutput::CombineFiles怎么用?PHP gpOutput::CombineFiles使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gpOutput
的用法示例。
在下文中一共展示了gpOutput::CombineFiles方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetComponents
/**
* Add one or more components to the page. Output the <script> and/or <style> immediately
* @param string $names comma separated list of components
*
*/
static function GetComponents($names = '')
{
includeFile('combine.php');
$scripts = gp_combine::ScriptInfo($names);
gpOutput::CombineFiles($scripts['css'], 'css', false);
gpOutput::CombineFiles($scripts['js'], 'js', false);
}
示例2: GetHead_CSS
/**
* Prepare and output the css for the current page
* @static
*/
function GetHead_CSS()
{
global $page, $config;
$css_files = array();
if (isset($_COOKIE[gp_session_cookie])) {
$css_files[] = '/include/css/additional.css';
}
if (isset($page->css_user) && is_array($page->css_user)) {
$css_files = array_merge($css_files, $page->css_user);
}
//after other styles, so themes can overwrite defaults
$theme_stylesheet = false;
if (!empty($page->theme_name) && $page->get_theme_css === true) {
$css_files[] = $theme_stylesheet = rawurldecode($page->theme_path) . '/style.css';
}
//layout css
if (isset($page->layout_css) && $page->layout_css) {
$css_files[] = '/data/_layouts/' . $page->gpLayout . '/custom.css';
}
//important admin css that shouldn't be overwritten by themes
if (common::LoggedIn()) {
$css_files[] = '/include/css/admin.css';
}
//styles that need to override admin.css should be added to $page->css_admin;
if (isset($page->css_admin) && is_array($page->css_admin)) {
$css_files = array_merge($css_files, $page->css_admin);
}
gpOutput::CombineFiles($css_files, 'css', $config['combinecss'], $theme_stylesheet);
}