本文整理匯總了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>