本文整理汇总了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');
}
}
示例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'));
}
示例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()));
}
}
示例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()));
}
}
示例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';
}
示例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()));
}
}
示例7: preExecute
public function preExecute()
{
if (sfConfig::get('app_sfSimpleBlog_use_bundled_layout', true)) {
$this->setLayout(sfLoader::getTemplateDir('sfSimpleBlog', 'layout.php') . '/layout');
}
}
示例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;
}
示例9: executeConfigShow
public function executeConfigShow()
{
$this->setLayout(sfLoader::getTemplateDir('sfControlPanel', 'layout.php').'/layout');
$config = sfConfig::getAll();
ksort($config);
$this->config = $config;
}