当前位置: 首页>>代码示例>>PHP>>正文


PHP sfLoader::getTemplateDir方法代码示例

本文整理汇总了PHP中sfLoader::getTemplateDir方法的典型用法代码示例。如果您正苦于以下问题:PHP sfLoader::getTemplateDir方法的具体用法?PHP sfLoader::getTemplateDir怎么用?PHP sfLoader::getTemplateDir使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在sfLoader的用法示例。


在下文中一共展示了sfLoader::getTemplateDir方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: preExecute

 public function preExecute()
 {
     if (sfConfig::get('app_sfSimpleBlog_use_bundled_layout', true)) {
         $this->setLayout(sfLoader::getTemplateDir('sfSimpleBlog', 'layout.php') . '/layout');
         $this->getResponse()->addStylesheet('/sfSimpleBlogPlugin/css/blog.css');
     }
 }
开发者ID:valerio-bozzolan,项目名称:openparlamento,代码行数:7,代码来源:BasesfSimpleBlogActions.class.php

示例2: preExecute

 public function preExecute()
 {
     if (sfConfig::get('app_sfSimpleBlog_use_bundled_layout', true)) {
         $this->setLayout(sfLoader::getTemplateDir('sfSimpleBlog', 'layout.php') . '/layout');
         $this->getResponse()->addStylesheet('/sfSimpleBlogPlugin/css/blog.css');
     }
     deppFiltersAndSortVariablesManager::resetVars($this->getUser(), 'module', 'module', array('acts_filter', 'sf_admin/opp_atto/sort', 'votes_filter', 'sf_admin/opp_votazione/sort', 'pol_camera_filter', 'pol_senato_filter', 'sf_admin/opp_carica/sort', 'argomento/atti_filter', 'argomento_leggi/sort', 'argomento_nonleg/sort'));
 }
开发者ID:valerio-bozzolan,项目名称:openparlamento,代码行数:8,代码来源:actions.class.php

示例3: configure

 /**
  * Configures template for this view.
  */
 public function configure()
 {
     $this->setDecorator(false);
     $this->setTemplate($this->actionName . $this->getExtension());
     if ('global' == $this->moduleName) {
         $this->setDirectory(sfConfig::get('sf_app_template_dir'));
     } else {
         $this->setDirectory(sfLoader::getTemplateDir($this->moduleName, $this->getTemplate()));
     }
 }
开发者ID:Daniel-Marynicz,项目名称:symfony1-legacy,代码行数:13,代码来源:sfPartialView.class.php

示例4: configure

 public function configure()
 {
     $response = $this->getContext()->getResponse();
     $response->setParameter($this->moduleName . '_' . $this->actionName . '_layout', false, 'symfony/action/view');
     $response->setContentType('application/x-javascript');
     $this->setTemplate($this->actionName . $this->viewName . $this->getExtension());
     // Set template directory
     if (!$this->directory) {
         $this->setDirectory(sfLoader::getTemplateDir($this->moduleName, $this->getTemplate()));
     }
 }
开发者ID:royalterra,项目名称:pdns-gui,代码行数:11,代码来源:sfJavascriptView.class.php

示例5: executeShow

 public function executeShow()
 {
     $culture = $this->getCulture();
     $editor_credentials = sfConfig::get('app_sfSimpleCMS_editor_credential', false);
     if ($this->getRequestParameter('edit') == 'true') {
         $this->checkEditorCredential();
         $page = sfSimpleCMSPagePeer::retrieveBySlug($this->getRequestParameter('slug', sfConfig::get('app_sfSimpleCMS_default_page', 'home')), $culture);
     } else {
         $page = sfSimpleCMSPagePeer::retrievePublicBySlug($this->getRequestParameter('slug', sfConfig::get('app_sfSimpleCMS_default_page', 'home')), $culture);
     }
     $this->forward404Unless($page);
     $this->page = $page;
     $this->culture = $culture;
     $this->getRequest()->setAttribute('culture', $culture);
     $this->setTemplate($this->page->getTemplate());
     $this->getResponse()->setTitle($this->page->getTitle());
     if (sfConfig::get('app_sfSimpleCMS_use_bundled_layout', true)) {
         $this->setLayout(sfLoader::getTemplateDir('sfSimpleCMS', 'layout.php') . '/layout');
         if (sfConfig::get('app_sfSimpleCMS_use_bundled_stylesheet', true)) {
             $this->getResponse()->addStylesheet('/sfSimpleCMSPlugin/css/CMSTemplates.css', 'last');
         }
     }
     return 'Template';
 }
开发者ID:net7,项目名称:Talia-CMS,代码行数:24,代码来源:BasesfSimpleCMSActions.class.php

示例6: configure

 public function configure()
 {
     $actionStackEntry = $this->getContext()->getActionStack()->getLastEntry();
     if (!$actionStackEntry->getViewInstance()) {
         $actionStackEntry->setViewInstance($this);
     }
     $viewConfigFile = $this->moduleName . '/' . sfConfig::get('sf_app_module_config_dir_name') . '/view.yml';
     require sfConfigCache::getInstance()->checkConfig(sfConfig::get('sf_app_module_dir_name') . '/' . $viewConfigFile);
     if (!$this->directory) {
         $this->setDirectory(sfLoader::getTemplateDir($this->moduleName, $this->getTemplate()));
     }
 }
开发者ID:kotow,项目名称:work,代码行数:12,代码来源:config_core_compile.yml.php

示例7: preExecute

 public function preExecute()
 {
     if (sfConfig::get('app_sfSimpleBlog_use_bundled_layout', true)) {
         $this->setLayout(sfLoader::getTemplateDir('sfSimpleBlog', 'layout.php') . '/layout');
     }
 }
开发者ID:valerio-bozzolan,项目名称:openparlamento,代码行数:6,代码来源:BasesfSimpleBlogPostAdminActions.class.php

示例8: executeTinyConfigMedia

 public function executeTinyConfigMedia()
 {
     $this->forward404Unless($this->hasRequestParameter('id'));
     $this->sf_asset = sfAssetPeer::retrieveByPk($this->getRequestParameter('id'));
     $this->forward404Unless($this->sf_asset);
     $this->setLayout(sfLoader::getTemplateDir('sfAsset', 'popupLayout.php') . '/popupLayout');
     return sfView::SUCCESS;
 }
开发者ID:vjousse,项目名称:sfDoctrineAssetsLibraryPlugin,代码行数:8,代码来源:BasesfAssetActions.class.php

示例9: executeConfigShow

 public function executeConfigShow()
 {
   $this->setLayout(sfLoader::getTemplateDir('sfControlPanel', 'layout.php').'/layout');
   $config = sfConfig::getAll();
   ksort($config);
   $this->config = $config;
 }
开发者ID:jonphipps,项目名称:Metadata-Registry,代码行数:7,代码来源:actions.class.php


注:本文中的sfLoader::getTemplateDir方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。