本文整理汇总了PHP中Backend::addStyle方法的典型用法代码示例。如果您正苦于以下问题:PHP Backend::addStyle方法的具体用法?PHP Backend::addStyle怎么用?PHP Backend::addStyle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Backend
的用法示例。
在下文中一共展示了Backend::addStyle方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: enable
public static function enable()
{
Backend::addScript(SITE_LINK . '/js/jquery.js');
Backend::addScript(SITE_LINK . '/js/wmd.component.js');
Backend::addScript(SITE_LINK . '/js/wmd/wmd.js');
Backend::addStyle(SITE_LINK . '/css/wmd.css');
}
示例2: html_list
public function html_list($result)
{
Backend::add('Sub Title', $result->getMeta('name'));
Backend::add('TabLinks', $this->getTabLinks(Controller::$action));
Backend::addScript(SITE_LINK . '/js/jquery.js');
Backend::addScript(SITE_LINK . '/js/image_list.js');
Backend::addStyle(SITE_LINK . '/css/image_list.css');
Backend::addContent(Render::renderFile('image.list.tpl.php', array('db_object' => $result)));
}
示例3: hook_post_display
/**
* This function adds all styles and scripts to the HTML. It also retrieves primary and secondary links from the App
*
*/
public static function hook_post_display($data, $controller)
{
Backend::addScript(SITE_LINK . '/js/backend.js');
//TODO Add site_link, and other vars, as JS vars
Backend::addScriptContent('var site_link = \'' . SITE_LINK . '\';');
//TODO if someone can land a script file in the correct place, he can insert JS at will...
$comp_script = '/js/' . Controller::$area . '.component.js';
$comp_style = '/css/' . Controller::$area . '.component.css';
if (file_exists(WEB_FOLDER . $comp_script)) {
Backend::addScript(SITE_LINK . $comp_script);
}
if (file_exists(WEB_FOLDER . $comp_style)) {
Backend::addStyle(SITE_LINK . $comp_style);
}
//Make sure that jquery and backend is right at the top
$scripts = array_unique(array_filter(Backend::getScripts()));
$against = array();
if (in_array(SITE_LINK . '/js/jquery.js', $scripts)) {
$against[] = SITE_LINK . '/js/jquery.js';
}
if (in_array(SITE_LINK . '/js/backend.js', $scripts)) {
$against[] = SITE_LINK . '/js/backend.js';
}
$scripts = array_unique(array_merge($against, $scripts));
Backend::add('Styles', array_unique(array_filter(Backend::getStyles())));
Backend::add('Scripts', $scripts);
Backend::add('ScriptContent', array_unique(array_filter(Backend::getScriptContent())));
$primary = Links::get('primary');
$secondary = Links::get('secondary');
$tertiary = Links::get('tertiary');
$app_class = ConfigValue::get('settings.Class', 'Application');
if (class_exists($app_class, true) && method_exists($app_class, 'getLinks')) {
$app_pri = call_user_func(array($app_class, 'getLinks'), 'primary');
$app_sec = call_user_func(array($app_class, 'getLinks'), 'secondary');
$app_tri = call_user_func(array($app_class, 'getLinks'), 'tertiary');
} else {
$app_pri = false;
$app_sec = false;
$app_tri = false;
}
$primary = array_merge($primary, is_array($app_pri) ? $app_pri : array());
$secondary = array_merge($secondary, is_array($app_sec) ? $app_sec : array());
$tertiary = array_merge($tertiary, is_array($app_tri) ? $app_tri : array());
Backend::add('primary_links', $primary);
Backend::add('secondary_links', $secondary);
Backend::add('tertiary_links', $tertiary);
return $data;
}