本文整理汇总了PHP中Layout::addToStyleList方法的典型用法代码示例。如果您正苦于以下问题:PHP Layout::addToStyleList方法的具体用法?PHP Layout::addToStyleList怎么用?PHP Layout::addToStyleList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Layout
的用法示例。
在下文中一共展示了Layout::addToStyleList方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: select2Script
/**
*
* @author Matthew McNaney <mcnaney at gmail dot com>
* @package Global
* @license http://opensource.org/licenses/lgpl-3.0.html
*/
function select2Script()
{
$script = '<script type="text/javascript" src="' . PHPWS_SOURCE_HTTP . 'javascript/select2/select2.min.js"></script>';
\Layout::addJSHeader($script);
\Layout::addToStyleList('javascript/select2/select2.min.css');
\Layout::addToStyleList('javascript/select2/select2-bootstrap.css');
}
示例2: importStyleSheets
public static function importStyleSheets()
{
if (isset($_SESSION['Layout_Settings']->_style_sheets)) {
foreach ($_SESSION['Layout_Settings']->_style_sheets as $css) {
Layout::addToStyleList($css);
}
}
}
示例3: view
/**
* Returns a menu and its links for display
*/
public function view($admin = false)
{
$key = Key::getCurrent();
if ($key && $key->isDummy(true)) {
return;
}
$theme_tpl_dir = \PHPWS_Template::getTplDir('menu') . 'menu_layout/';
$menu_tpl_dir = PHPWS_SOURCE_DIR . 'mod/menu/templates/menu_layout/';
$theme_path = $theme_tpl_dir . $this->template . '/';
$menu_path = $menu_tpl_dir . $this->template . '/';
if (is_file($theme_path . 'menu.tpl')) {
$file = $theme_path . 'menu.tpl';
$path = $theme_path;
$http = 'themes/' . Layout::getTheme() . '/templates/menu/menu_layout/' . $this->template . '/';
} elseif (is_file($menu_path . 'menu.tpl')) {
$file = $menu_path . 'menu.tpl';
$path = $menu_path;
$http = 'mod/menu/templates/menu_layout/' . $this->template . '/';
} else {
$this->template = 'basic';
$this->save();
$path = $menu_tpl_dir . 'basic/';
$http = 'mod/menu/templates/menu_layout/basic/';
$file = $path . '/menu.tpl';
}
$this->parseIni($path);
if ($this->_style) {
$style = $http . 'style.css';
Layout::addToStyleList($style);
}
$tpl['TITLE'] = $this->getTitle();
$tpl['LINKS'] = $this->displayLinks($admin);
$tpl['MENU_ID'] = sprintf('menu-%s', $this->id);
$content = PHPWS_Template::process($tpl, 'menu', $file, true);
return $content;
}