當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Section::getArticleTemplateId方法代碼示例

本文整理匯總了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;
}
開發者ID:nistormihai,項目名稱:Newscoop,代碼行數:31,代碼來源:preview.php

示例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());
 }
開發者ID:nistormihai,項目名稱:Newscoop,代碼行數:14,代碼來源:MetaArticle.php

示例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>
開發者ID:nistormihai,項目名稱:Newscoop,代碼行數:31,代碼來源:edit.php


注:本文中的Section::getArticleTemplateId方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。