当前位置: 首页>>代码示例>>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;未经允许,请勿转载。