本文整理汇总了PHP中Section::getArticleTemplateId方法的典型用法代码示例。如果您正苦于以下问题:PHP Section::getArticleTemplateId方法的具体用法?PHP Section::getArticleTemplateId怎么用?PHP Section::getArticleTemplateId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Section
的用法示例。
在下文中一共展示了Section::getArticleTemplateId方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Language
$f_publication_id = Input::Get('f_publication_id', 'int', 0);
$f_issue_number = Input::Get('f_issue_number', 'int', 0);
$f_section_number = Input::Get('f_section_number', 'int', 0);
$f_article_number = Input::Get('f_article_number', 'int', 0);
$languageObj = new Language($f_language_selected);
$publicationObj = new Publication($f_publication_id);
$issueObj = new Issue($f_publication_id, $f_language_id, $f_issue_number);
$sectionObj = new Section($f_publication_id, $f_issue_number, $f_language_id, $f_section_number);
$articleObj = new Article($f_language_selected, $f_article_number);
$errorStr = "";
if (!$articleObj->exists()) {
$errorStr = getGS('There was an error reading request parameters.');
} else {
$templateId = $sectionObj->getArticleTemplateId();
if ($templateId == 0) {
$templateId = $issueObj->getArticleTemplateId();
}
//getGS("This article cannot be previewed. Please make sure it has the front page template selected.");
if ($templateId == 0) {
$errorStr = getGS('This article cannot be previewed. Please make sure it has the article template selected.');
}
}
$templateObj = new Template($templateId);
if (!isset($_SERVER['SERVER_PORT']))
{
$_SERVER['SERVER_PORT'] = 80;
}
示例2: getTemplate
protected function getTemplate()
{
$articleSection = new Section($this->m_dbObject->getProperty('IdPublication'),
$this->m_dbObject->getProperty('NrIssue'),
$this->m_dbObject->getProperty('IdLanguage'),
$this->m_dbObject->getProperty('NrSection'));
if ($articleSection->getArticleTemplateId() > 0) {
return new MetaTemplate($articleSection->getArticleTemplateId());
}
$articleIssue = new Issue($this->m_dbObject->getProperty('IdPublication'),
$this->m_dbObject->getProperty('IdLanguage'),
$this->m_dbObject->getProperty('NrIssue'));
return new MetaTemplate($articleIssue->getArticleTemplateId());
}
示例3: foreach
<?php
foreach ($templates as $template) {
camp_html_select_option($template->getTemplateId(), $sectionObj->getSectionTemplateId(), $template->getName());
}
?>
</select>
</td>
</tr>
<tr>
<td align="right"><?php putGS("Article Template"); ?>:</td>
<td>
<select name="cArticleTplId" class="input_select">
<option value="0">---</option>
<?php
foreach ($templates as $template) {
camp_html_select_option($template->getTemplateId(), $sectionObj->getArticleTemplateId(), $template->getName());
}
?>
</select>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="hidden" name="Pub" value="<?php p($Pub); ?>" />
<input type="hidden" name="Issue" value="<?php p($Issue); ?>" />
<input type="hidden" name="Language" value="<?php p($Language); ?>" />
<input type="hidden" name="Section" value="<?php p($Section); ?>" />
<input type="hidden" name="f_language_selected" ID="f_language_selected" value="<?php p($editorLanguage); ?>" />
<input type="submit" class="button" name="Save" value="<?php putGS('Save'); ?>" />
</td>
</tr>