本文整理汇总了PHP中sfLoader::getTemplatePath方法的典型用法代码示例。如果您正苦于以下问题:PHP sfLoader::getTemplatePath方法的具体用法?PHP sfLoader::getTemplatePath怎么用?PHP sfLoader::getTemplatePath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sfLoader
的用法示例。
在下文中一共展示了sfLoader::getTemplatePath方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: executeEmbed
public function executeEmbed()
{
$culture = $this->getCulture();
if ($this->getRequestParameter('edit') == 'true') {
if (!$this->checkEditorCredential()) {
$this->CMS_error_msg = 'You need the editor credential to edit this content';
return;
}
$page = sfSimpleCMSPagePeer::retrieveBySlug($this->slug, $culture);
} else {
$page = sfSimpleCMSPagePeer::retrievePublicBySlug($this->slug, $culture);
}
if (!$page) {
$this->CMS_error_msg = sprintf('The page %s does not exist in culture %c', $this->slug, $culture);
return;
}
$this->page = $page;
$this->culture = $culture;
$this->getRequest()->setAttribute('culture', $culture);
$this->templatePath = sfLoader::getTemplatePath('sfSimpleCMS', $this->page->getTemplate() . 'Template.php');
sfConfig::set('app_sfSimpleCMS_disable_editor_toolbar', true);
}
示例2: decorate_with
<?php
decorate_with(sfLoader::getTemplatePath('default', 'defaultLayout.php'));
?>
<div class="sfTMessageContainer sfTAlert">
<?php
echo image_tag('/sf/sf_default/images/icons/tools48.png', array('alt' => 'website unavailable', 'class' => 'sfTMessageIcon', 'size' => '48x48'));
?>
<div class="sfTMessageWrap">
<h1>We're Sorry!<br />The Metadata Registry is briefly unavailable</h1>
<h5>This website has been temporarily disabled. Please try again later.</h5>
</div>
</div>