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


PHP FabrikHelperHTML::cssAsAsset方法代碼示例

本文整理匯總了PHP中FabrikHelperHTML::cssAsAsset方法的典型用法代碼示例。如果您正苦於以下問題:PHP FabrikHelperHTML::cssAsAsset方法的具體用法?PHP FabrikHelperHTML::cssAsAsset怎麽用?PHP FabrikHelperHTML::cssAsAsset使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在FabrikHelperHTML的用法示例。


在下文中一共展示了FabrikHelperHTML::cssAsAsset方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getFormCss

 /**
  * loads form's css files
  * Checks : custom css file, template css file. Including them if found
  *
  * @return  void
  */
 public function getFormCss()
 {
     $input = $this->app->input;
     $jTmplFolder = FabrikWorker::j3() ? 'tmpl' : 'tmpl25';
     $tmpl = $this->getTmpl();
     $v = $this->isEditable() ? 'form' : 'details';
     // Check for a form template file (code moved from view)
     if ($tmpl != '') {
         $qs = '?c=' . $this->getId();
         $qs .= '&rowid=' . $this->getRowId();
         /* $$$ need & for pdf output which is parsed through xml parser otherwise fails
          * If FabrikHelperHTML::styleSheetajax loaded then don't do &
          */
         $view = $this->isEditable() ? 'form' : 'details';
         if (FabrikHelperHTML::cssAsAsset()) {
             $qs .= '&view=' . $v;
             $qs .= '&rowid=' . $this->getRowId();
         } else {
             $qs .= '&view=' . $v;
             $qs .= '&rowid=' . $this->getRowId();
         }
         $tmplPath = 'templates/' . $this->app->getTemplate() . '/html/com_fabrik/' . $view . '/' . $tmpl . '/template_css.php' . $qs;
         if (!FabrikHelperHTML::stylesheetFromPath($tmplPath)) {
             FabrikHelperHTML::stylesheetFromPath('components/com_fabrik/views/' . $view . '/' . $jTmplFolder . '/' . $tmpl . '/template_css.php' . $qs);
         }
         /* $$$ hugh - as per Skype convos with Rob, decided to re-instate the custom.css convention.  So I'm adding two files:
          * custom.css - for backward compat with existing 2.x custom.css
          * custom_css.php - what we'll recommend people use for custom css moving forward.
          */
         if (!FabrikHelperHTML::stylesheetFromPath('templates/' . $this->app->getTemplate() . '/html/com_fabrik/' . $view . '/' . $tmpl . '/custom.css' . $qs)) {
             FabrikHelperHTML::stylesheetFromPath('components/com_fabrik/views/' . $view . '/' . $jTmplFolder . '/' . $tmpl . '/custom.css' . $qs);
         }
         $path = 'templates/' . $this->app->getTemplate() . '/html/com_fabrik/' . $view . '/' . $tmpl . '/custom_css.php' . $qs;
         if (!FabrikHelperHTML::stylesheetFromPath($path)) {
             $displayData = new stdClass();
             $displayData->view = $view;
             $displayData->tmpl = $tmpl;
             $displayData->qs = $qs;
             $displayData->jTmplFolder = $jTmplFolder;
             $displayData->formModel = $this;
             $layout = $this->getLayout('form.fabrik-custom-css-qs');
             $path = $layout->render($displayData);
             FabrikHelperHTML::stylesheetFromPath($path);
         }
     }
     if ($this->app->isAdmin() && $input->get('tmpl') === 'components') {
         FabrikHelperHTML::stylesheet('administrator/templates/system/css/system.css');
     }
 }
開發者ID:glauberm,項目名稱:cinevi,代碼行數:55,代碼來源:form.php

示例2: getFormCss

 /**
  * loads form's css files
  * Checks : custom css file, template css file. Including them if found
  *
  * @return  void
  */
 public function getFormCss()
 {
     $app = JFactory::getApplication();
     $tmpl = $this->getTmpl();
     $v = $this->isEditable() ? 'form' : 'details';
     // Check for a form template file (code moved from view)
     if ($tmpl != '') {
         $qs = '?c=' . $this->getId();
         /* $$$ need & for pdf output which is parsed through xml parser otherwise fails
          * If FabrikHelperHTML::styleSheetajax loaded then dont do &
          */
         $qs .= FabrikHelperHTML::cssAsAsset() ? '&view=' . $v : '&view=' . $v;
         $tmplPath = 'templates/' . $app->getTemplate() . '/html/com_fabrik/form/' . $tmpl . '/template_css.php' . $qs;
         if (!FabrikHelperHTML::stylesheetFromPath($tmplPath)) {
             FabrikHelperHTML::stylesheetFromPath('components/com_fabrik/views/form/tmpl/' . $tmpl . '/template_css.php' . $qs);
         }
         /* $$$ hugh - as per Skype convos with Rob, decided to re-instate the custom.css convention.  So I'm adding two files:
          * custom.css - for backward compat with existing 2.x custom.css
          * custom_css.php - what we'll recommend people use for custom css moving foward.
          */
         if (!FabrikHelperHTML::stylesheetFromPath('templates/' . $app->getTemplate() . '/html/com_fabrik/form/' . $tmpl . '/custom.css' . $qs)) {
             FabrikHelperHTML::stylesheetFromPath('components/com_fabrik/views/form/tmpl/' . $tmpl . '/custom.css' . $qs);
         }
         if (!FabrikHelperHTML::stylesheetFromPath('templates/' . $app->getTemplate() . '/html/com_fabrik/form/' . $tmpl . '/custom_css.php' . $qs)) {
             FabrikHelperHTML::stylesheetFromPath('components/com_fabrik/views/form/tmpl/' . $tmpl . '/custom_css.php' . $qs);
         }
     }
     if ($app->isAdmin() && JRequest::getVar('tmpl') === 'components') {
         FabrikHelperHTML::stylesheet('administrator/templates/system/css/system.css');
     }
 }
開發者ID:rogeriocc,項目名稱:fabrik,代碼行數:37,代碼來源:form.php


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