當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Backend::addStyle方法代碼示例

本文整理匯總了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');
 }
開發者ID:jrgns,項目名稱:backend-php,代碼行數:7,代碼來源:WMD.obj.php

示例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)));
 }
開發者ID:jrgns,項目名稱:backend-php,代碼行數:9,代碼來源:Image.obj.php

示例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;
 }
開發者ID:jrgns,項目名稱:backend-php,代碼行數:52,代碼來源:HtmlView.obj.php


注:本文中的Backend::addStyle方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。