当前位置: 首页>>代码示例>>PHP>>正文


PHP Section::getName方法代码示例

本文整理汇总了PHP中Section::getName方法的典型用法代码示例。如果您正苦于以下问题:PHP Section::getName方法的具体用法?PHP Section::getName怎么用?PHP Section::getName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Section的用法示例。


在下文中一共展示了Section::getName方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: while

 function _saveSections()
 {
     require_once 'AMP/Content/Section.inc.php';
     $section_count = 1;
     $form =& $this->get_form();
     while (isset($this->_request_vars[$this->_get_section_fieldname($section_count)]) && $this->_request_vars[$this->_get_section_fieldname($section_count)]) {
         $name = $this->_request_vars[$this->_get_section_fieldname($section_count)];
         $text = $this->_request_vars[$this->_get_section_fieldname($section_count, 'text')];
         $section = new Section(AMP_Registry::getDbcon());
         $section->setName($name);
         $section->setBlurb($text);
         $section->setParent();
         $section->setListType();
         if (!($result = $section->save())) {
             ++$section_count;
             continue;
         }
         $section->publish();
         $section->reorder($section_count);
         $form->setValues(array($this->_get_section_fieldname($section_count) => '', $this->_get_section_fieldname($section_count, 'text') => ''));
         $this->message(sprintf(AMP_TEXT_DATA_SAVE_SUCCESS, $section->getName()));
         ++$section_count;
     }
 }
开发者ID:radicaldesigns,项目名称:amp,代码行数:24,代码来源:Controller.php

示例2: count

    $allArticles = Article::GetArticles($f_publication_id, $f_issue_number, $f_section_number, $f_language_selected, $sqlOptions);
    $numUniqueArticles = $totalArticles;
    $numUniqueArticlesDisplayed = count($allArticles);
} else {
    // Show articles in all languages.
    $totalArticles = Article::GetArticles($f_publication_id, $f_issue_number, $f_section_number, null, null, true);
    $allArticles = Article::GetArticlesGrouped($f_publication_id, $f_issue_number, $f_section_number, null, $f_language_id, $sqlOptions);
    $numUniqueArticles = Article::GetArticlesGrouped($f_publication_id, $f_issue_number, $f_section_number, null, null, null, true);
    $numUniqueArticlesDisplayed = count(array_unique(DbObjectArray::GetColumn($allArticles, 'Number')));
}
$numArticlesThisPage = count($allArticles);
$previousArticleNumber = 0;
$pagerUrl = "index.php?f_publication_id=" . $f_publication_id . "&f_issue_number=" . $f_issue_number . "&f_section_number=" . $f_section_number . "&f_language_id=" . $f_language_id . "&f_language_selected=" . $f_language_selected . "&";
$pager = new SimplePager($numUniqueArticles, $ArticlesPerPage, $offsetVarName, $pagerUrl);
$topArray = array('Pub' => $publicationObj, 'Issue' => $issueObj, 'Section' => $sectionObj);
camp_html_content_top($translator->trans('Article List', array(), 'articles') . ': ' . $this->view->escape($sectionObj->getName()), $topArray);
$controller->view->headTitle($translator->trans('Article List', array(), 'articles') . ': ' . $this->view->escape($sectionObj->getName()) . ' - Newscoop Admin', 'SET');
?>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="1" class="action_buttons" style="padding-top: 5px;">
<TR>
	<TD><A HREF="/<?php 
echo $ADMIN;
?>
/sections/?Pub=<?php 
p($f_publication_id);
?>
&Issue=<?php 
p($f_issue_number);
?>
&Language=<?php 
p($f_language_id);
开发者ID:sourcefabric,项目名称:newscoop,代码行数:31,代码来源:index.php

示例3: update

 public function update(Section $section)
 {
     $this->updateObject('Section', 's_id', $section->getId(), ['u_id' => $section->getUserId(), 's_supe' => $section->getParentId(), 's_name' => $section->getName()]);
 }
开发者ID:harraps,项目名称:miniForum,代码行数:4,代码来源:SectionManager.php

示例4: putGS

		</TR>
		</TABLE>
	</TD>
</TR>
</TABLE>

<TABLE BORDER="0" CELLSPACING="1" CELLPADDING="1" WIDTH="100%" class="current_location_table">
<TR>
	<TD ALIGN="RIGHT" WIDTH="1%" NOWRAP VALIGN="TOP" class="current_location_title">&nbsp;<?php putGS("Publication"); ?>:</TD>
	<TD VALIGN="TOP" class="current_location_content"><?php echo htmlspecialchars($publicationObj->getName()); ?></TD>

	<TD ALIGN="RIGHT" WIDTH="1%" NOWRAP VALIGN="TOP" class="current_location_title">&nbsp;<?php putGS("Issue"); ?>:</TD>
	<TD VALIGN="TOP" class="current_location_content"><?php echo $issueObj->getIssueNumber(); ?>. <?php echo htmlspecialchars($issueObj->getName()); ?> (<?php echo htmlspecialchars($issueLanguage->getName()); ?>)</TD>

	<TD ALIGN="RIGHT" WIDTH="1%" NOWRAP VALIGN="TOP" class="current_location_title">&nbsp;<?php putGS("Section"); ?>:</TD>
	<TD VALIGN="TOP" class="current_location_content"><?php echo $sectionObj->getSectionNumber(); ?>. <?php echo htmlspecialchars($sectionObj->getName()); ?></TD>

	<TD ALIGN="RIGHT" WIDTH="1%" NOWRAP VALIGN="TOP" class="current_location_title">&nbsp;<?php putGS("Article"); ?>:</TD>
	<TD VALIGN="TOP" class="current_location_content"><?php echo htmlspecialchars($articleObj->getTitle()); ?> (<?php echo htmlspecialchars($articleLanguage->getName()); ?>)</TD>
</TR>
</TABLE>

<table width="100%" border="0">
<tr>
	<td style="padding:20px;" align="center">
		Here you can upload an article that has been written in Open Office (files with extension ".sxw").  Click <a href="CampsiteArticleTemplate.stw">here</a> to get the template.
	</td>
</tr>
</table>

<form method="POST" action="CommandProcessor.php" onsubmit="return <?php camp_html_fvalidate(); ?>;" enctype="multipart/form-data">
开发者ID:nistormihai,项目名称:Newscoop,代码行数:31,代码来源:index.php

示例5: Section

 if (!$sectionObj->exists()) {
     camp_html_display_error(getGS('No such section.'), $backLink);
     exit;
 }
 $translationSectionObj = new Section($f_publication_id, $f_issue_number, $f_translation_language, $f_section_number);
 if (!$translationSectionObj->exists()) {
     if (!$g_user->hasPermission("ManageSection")) {
         camp_html_add_msg(getGS('A section must be created for the selected language but you do not have the right to create a section.'));
         camp_html_goto_page($backLink);
     }
     foreach ($sectionObj->getData() as $field => $fieldValue) {
         if ($field != 'IdLanguage') {
             $translationSectionObj->setProperty($field, $fieldValue, false);
         }
     }
     $f_section_name = Input::Get('f_section_name', 'string', $sectionObj->getName());
     $f_section_urlname = Input::Get('f_section_urlname', 'string', $sectionObj->getUrlName());
     if ($f_section_urlname == "") {
         camp_html_add_msg(getGS('You must fill in the $1 field.', '"' . getGS('New section URL name') . '"'));
         camp_html_goto_page($backLink);
     }
     if (!camp_is_valid_url_name($f_section_urlname)) {
         camp_html_add_msg(getGS('The $1 field may only contain letters, digits and underscore (_) character.', '"' . getGS('New section URL name') . '"'));
         camp_html_goto_page($backLink);
     }
     $translationSectionObj->create($f_section_name, $f_section_urlname);
     if (!$translationSectionObj->exists()) {
         camp_html_add_msg(getGS('Unable to create the section for translation $1.', $translationLanguageObj->getName()));
         camp_html_goto_page($backLink);
     }
 } else {
开发者ID:nidzix,项目名称:Newscoop,代码行数:31,代码来源:do_translate.php

示例6: array

require_once $GLOBALS['g_campsiteDir'] . "/{$ADMIN_DIR}/sections/section_common.php";
require_once $GLOBALS['g_campsiteDir'] . '/classes/Article.php';
$translator = \Zend_Registry::get('container')->getService('translator');
if (!$g_user->hasPermission('DeleteSection')) {
    camp_html_display_error($translator->trans('You do not have the right to delete sections.', array(), 'sections'));
    exit;
}
$f_publication_id = Input::Get('Pub', 'int', 0);
$f_issue_number = Input::Get('Issue', 'int', 0);
$f_language_id = Input::Get('Language', 'int', 0);
$f_section_number = Input::Get('Section', 'int', 0);
$numArticles = count(Article::GetArticles($f_publication_id, $f_issue_number, $f_section_number, $f_language_id));
$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);
$sectionTranslations = Section::GetSections($f_publication_id, $f_issue_number, null, null, $sectionObj->getName(), null);
$topArray = array('Pub' => $publicationObj, 'Issue' => $issueObj, 'Section' => $sectionObj);
camp_html_content_top($translator->trans('Delete section', array(), 'sections'), $topArray);
?>
<P>
<FORM METHOD="POST" ACTION="/<?php 
echo $ADMIN;
?>
/sections/do_del.php">
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="8" class="message_box">
<?php 
echo SecurityToken::FormParameter();
?>
<TR>
	<TD COLSPAN="2" align="center"><?php 
echo $translator->trans('There are $1 articles in this section.', array('$1' => '<b>' . $numArticles . '</b>'), 'sections');
开发者ID:alvsgithub,项目名称:Newscoop,代码行数:31,代码来源:del.php

示例7: addSection

 /**
  * Append a section to the end of this INI file
  *
  * @param Section $section
  */
 public function addSection(Section $section)
 {
     $this->sections[$section->getName()] = $section;
 }
开发者ID:JakobGM,项目名称:icingaweb2,代码行数:9,代码来源:Document.php

示例8: alert

                alert('<?php putGS("The section number specified already exists, please specify a different value or use the dropdown to find an existing section."); ?>');
                return false;
            }
        }
    }
    return true;
} // fn CustomValidator_DuplicateSection
</script>

<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="1" class="action_buttons" style="padding-top: 5px;">
<TR>
	<TD><A HREF="/<?php echo $ADMIN; ?>/sections/?Pub=<?php p($f_src_publication_id); ?>&Issue=<?php p($f_src_issue_number); ?>&Language=<?php p($f_language_id); ?>"><IMG SRC="<?php echo $Campsite["ADMIN_IMAGE_BASE_URL"]; ?>/left_arrow.png" BORDER="0"></A></TD>
	<TD><A HREF="/<?php echo $ADMIN; ?>/sections/?Pub=<?php p($f_src_publication_id); ?>&Issue=<?php p($f_src_issue_number); ?>&Language=<?php p($f_language_id); ?>"><B><?php  putGS("Section List"); ?></B></A></TD>

	<TD style="padding-left: 20px;"><A HREF="/<?php echo $ADMIN; ?>/sections/edit.php?Pub=<?php p($f_src_publication_id); ?>&f_issue_number=<?php  p($f_src_issue_number); ?>&f_section_number=<?php p($f_src_section_number); ?>&f_language_id=<?php  p($f_language_id); ?>"><IMG SRC="<?php echo $Campsite["ADMIN_IMAGE_BASE_URL"]; ?>/left_arrow.png" BORDER="0"></A></TD>
	<TD><A HREF="/<?php echo $ADMIN; ?>/sections/edit.php?Pub=<?php p($f_src_publication_id); ?>&Issue=<?php p($f_src_issue_number); ?>&Section=<?php p($f_src_section_number); ?>&Language=<?php  p($f_language_id); ?>"><B><?php  putGS("Section"); ?>: <?php p(htmlspecialchars($sectionObj->getName())); ?></B></A></TD>
</TR>
</TABLE>

<P>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" class="table_input" style="padding-top: 10px; padding-bottom: 10px; padding-left: 20px; padding-right: 20px;">
<tr>
<td>
<table BORDER="0" CELLSPACING="0" CELLPADDING="0" ALIGN="CENTER" >
<TR>
	<TD colspan="2" style="font-size: 14pt; padding-top: 10px;"><b><?php  putGS("Duplicate Section:"); ?> <?php  p(htmlspecialchars($sectionObj->getName())); ?></b></TD>
</TR>
<TR>
	<td colspan="3">&nbsp;</TD>
</TR>
<TR>
开发者ID:nistormihai,项目名称:Newscoop,代码行数:31,代码来源:duplicate.php

示例9: array

        $f_section_name = Input::Get('f_section_name', 'string', $sectionObj->getName());
        $f_section_urlname = Input::Get('f_section_urlname', 'string', $sectionObj->getUrlName());
        if ($f_section_urlname == "") {
            camp_html_add_msg($translator->trans('You must fill in the $1 field.', array('$1' => '"' . $translator->trans('New section URL name', array(), 'articles') . '"')));
            camp_html_goto_page($backLink);
        }
        if (!camp_is_valid_url_name($f_section_urlname)) {
            camp_html_add_msg($translator->trans('The $1 field may only contain letters, digits and underscore (_) character.', array('$1' => '"' . $translator->trans('New section URL name', array(), 'articles') . '"')));
            camp_html_goto_page($backLink);
        }
        $translationSectionObj->create($f_section_name, $f_section_urlname);
        if (!$translationSectionObj->exists()) {
            camp_html_add_msg($translator->trans('Unable to create the section for translation $1.', array('$1' => $translationLanguageObj->getName()), 'articles'));
            camp_html_goto_page($backLink);
        }
    } else {
        $f_section_name = Input::Get('f_section_name', 'string', $translationSectionObj->getName());
        $f_section_urlname = Input::Get('f_section_urlname', 'string', $translationSectionObj->getUrlName());
        $translationSectionObj->update(array('Name' => $f_section_name, 'ShortName' => $f_section_urlname));
    }
}
if ($articleObj->translationTitleExists($f_translation_title, $f_translation_language)) {
    camp_html_add_msg($translator->trans("There already is an article with the same name. Please change the name and try again.", array(), 'articles'), "ok");
    camp_html_goto_page($backLink);
    exit;
}
$articleCopy = $articleObj->createTranslation($f_translation_language, $g_user->getUserId(), $f_translation_title);
\Zend_Registry::get('container')->getService('dispatcher')->dispatch('article.translate', new \Newscoop\EventDispatcher\Events\GenericEvent($this, array('article' => $articleCopy)));
camp_html_add_msg($translator->trans("Article translation created.", array(), 'articles'), "ok");
ArticleIndex::RunIndexer(3, 10, true);
camp_html_goto_page(camp_html_article_url($articleCopy, $f_translation_language, 'edit.php'), true);
开发者ID:sourcefabric,项目名称:newscoop,代码行数:31,代码来源:do_translate.php

示例10: count

    $allArticles = Article::GetArticles($f_publication_id, $f_issue_number, $f_section_number, $f_language_selected, $sqlOptions);
    $numUniqueArticles = $totalArticles;
    $numUniqueArticlesDisplayed = count($allArticles);
} else {
    // Show articles in all languages.
    $totalArticles = Article::GetArticles($f_publication_id, $f_issue_number, $f_section_number, null, null, true);
    $allArticles = Article::GetArticlesGrouped($f_publication_id, $f_issue_number, $f_section_number, null, $f_language_id, $sqlOptions);
    $numUniqueArticles = Article::GetArticlesGrouped($f_publication_id, $f_issue_number, $f_section_number, null, null, null, true);
    $numUniqueArticlesDisplayed = count(array_unique(DbObjectArray::GetColumn($allArticles, 'Number')));
}
$numArticlesThisPage = count($allArticles);
$previousArticleNumber = 0;
$pagerUrl = "index.php?f_publication_id=" . $f_publication_id . "&f_issue_number=" . $f_issue_number . "&f_section_number=" . $f_section_number . "&f_language_id=" . $f_language_id . "&f_language_selected=" . $f_language_selected . "&";
$pager = new SimplePager($numUniqueArticles, $ArticlesPerPage, $offsetVarName, $pagerUrl);
$topArray = array('Pub' => $publicationObj, 'Issue' => $issueObj, 'Section' => $sectionObj);
camp_html_content_top($translator->trans('Article List', array(), 'articles') . ': ' . $this->view->escape($sectionObj->getName()), $topArray);
?>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="1" class="action_buttons" style="padding-top: 5px;">
<TR>
	<TD><A HREF="/<?php 
echo $ADMIN;
?>
/sections/?Pub=<?php 
p($f_publication_id);
?>
&Issue=<?php 
p($f_issue_number);
?>
&Language=<?php 
p($f_language_id);
?>
开发者ID:alvsgithub,项目名称:Newscoop,代码行数:31,代码来源:index.php

示例11: count

	$numUniqueArticlesDisplayed = count(array_unique(DbObjectArray::GetColumn($allArticles, 'Number')));
}
$numArticlesThisPage = count($allArticles);

$previousArticleNumber = 0;

$pagerUrl = "index.php?f_publication_id=".$f_publication_id
	."&f_issue_number=".$f_issue_number
	."&f_section_number=".$f_section_number
	."&f_language_id=".$f_language_id
	."&f_language_selected=".$f_language_selected."&";
$pager = new SimplePager($numUniqueArticles, $ArticlesPerPage, $offsetVarName, $pagerUrl);

$topArray = array('Pub' => $publicationObj, 'Issue' => $issueObj,
				  'Section' => $sectionObj);
camp_html_content_top(getGS('Article List') . ': ' . $sectionObj->getName(), $topArray);
?>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="1" class="action_buttons" style="padding-top: 5px;">
<TR>
	<TD><A HREF="/<?php echo $ADMIN; ?>/sections/?Pub=<?php p($f_publication_id); ?>&Issue=<?php p($f_issue_number); ?>&Language=<?php p($f_language_id); ?>"><IMG SRC="<?php echo $Campsite["ADMIN_IMAGE_BASE_URL"]; ?>/left_arrow.png" BORDER="0"></A></TD>
	<TD><A HREF="/<?php echo $ADMIN; ?>/sections/?Pub=<?php p($f_publication_id); ?>&Issue=<?php p($f_issue_number); ?>&Language=<?php p($f_language_id); ?>"><B><?php  putGS("Section List"); ?></B></A></TD>
	<?php if ($g_user->hasPermission('AddArticle')) { ?>
	<TD style="padding-left: 20px;"><A HREF="add.php?f_publication_id=<?php p($f_publication_id); ?>&f_issue_number=<?php p($f_issue_number); ?>&f_section_number=<?php p($f_section_number); ?>&f_language_id=<?php p($f_language_id); ?>" ><IMG SRC="<?php echo $Campsite["ADMIN_IMAGE_BASE_URL"]; ?>/add.png" BORDER="0"></A></TD>
	<TD><A HREF="add.php?f_publication_id=<?php p($f_publication_id); ?>&f_issue_number=<?php p($f_issue_number); ?>&f_section_number=<?php p($f_section_number); ?>&f_language_id=<?php p($f_language_id); ?>" ><B><?php  putGS("Add new article"); ?></B></A></TD>
	<?php  } ?>
</tr>
</TABLE>
<?php
    $articlelist = new ArticleList();

    $articlelist->setPublication($f_publication_id);
开发者ID:nistormihai,项目名称:Newscoop,代码行数:31,代码来源:index.php

示例12: array

$topArray = array('Pub' => $srcPublicationObj, 'Issue' => $srcIssueObj, 'Section' => $srcSectionObj);
camp_html_content_top(getGS('Duplicating section'), $topArray);

?>
<P>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="8" class="message_box">
<TR>
	<TD COLSPAN="2">
		<B> <?php  putGS("Duplicating section"); ?> </B>
		<HR NOSHADE SIZE="1" COLOR="BLACK">
	</TD>
</TR>
<TR>
	<TD COLSPAN="2">
		<BLOCKQUOTE>
 	  <?php  putGS('Section $1 has been duplicated to $2. $3 of $4', '<B>'.$srcSectionObj->getName().'</B>', '<B>'.$dstSectionObj->getIssueNumber().'</B>', '<B>'.$dstIssueObj->getName().' ('.$dstIssueObj->getLanguageName().')</B>', '<B>'.$dstPublicationObj->getName().'</B>'); ?>
		</BLOCKQUOTE>
	</TD>
</TR>
<TR>
	<TD COLSPAN="2">
		<DIV ALIGN="CENTER">
            <table>
            <tr>
                <td>
                   <b><a href="<?php echo "/$ADMIN/sections/edit.php?Pub=$f_dest_publication_id&Issue=$f_dest_issue_number&Section=$f_dest_section_number&Language=$f_language_id"; ?>"><?php putGS("Go to new section"); ?></a></b>
                </td>
                <td style="padding-left: 50px;">
    	           <b><a href="<?php echo "/$ADMIN/sections/edit.php?Pub=$f_src_publication_id&Issue=$f_src_issue_number&Section=$f_src_section_number&Language=$f_language_id"; ?>"><?php putGS("Go to source section"); ?></a></b>
    	        </td>
    	    </tr>
开发者ID:nistormihai,项目名称:Newscoop,代码行数:31,代码来源:duplicate_complete.php

示例13: putGS

 </B>
		<HR NOSHADE SIZE="1" COLOR="BLACK">
	</TD>
</TR>
<TR>
	<TD COLSPAN="2">
		<BLOCKQUOTE>
		<?php 
if (!$correct) {
    echo "<LI>";
    putGS('Invalid parameters received');
    echo "</LI>\n";
} else {
    ?>
				<LI><?php 
    putGS('The section $1 could not be duplicated', '<B>' . htmlspecialchars($srcSectionObj->getName()) . '</B>');
    ?>
</LI>
		<?php 
}
?>
		</BLOCKQUOTE>
	</TD>
</TR>
<TR>
	<TD COLSPAN="2">
	<DIV ALIGN="CENTER">
           <INPUT TYPE="button" class="button" NAME="OK" VALUE="<?php 
putGS('OK');
?>
" ONCLICK="location.href='/<?php 
开发者ID:nidzix,项目名称:Newscoop,代码行数:31,代码来源:do_duplicate.php

示例14: printSectionHeader

/**
 * Prints a section's header table with name and share links.
 * @param Section $section
 */
function printSectionHeader($section)
{
    ?>

    <div class="course">
        <div class="share">
            <div class='shareButton emailShare' data-type='Email' data-id='<?php 
    echo $section->getSlug();
    ?>
'><img src='<?php 
    echo BASE_URL;
    ?>
images/share-email.png'/>Email</div>
        </div>
        <div class="text"><?php 
    echo $section->getName();
    ?>
</div>
    </div>

    <?php 
}
开发者ID:therealchiko,项目名称:getchabooks,代码行数:26,代码来源:table.php

示例15: array

    exit;
}
if (!$g_user->hasPermission('DeleteSection')) {
    camp_html_display_error($translator->trans('You do not have the right to delete sections.', array(), 'sections'));
    exit;
}
$f_publication_id = Input::Get('f_publication_id', 'int', 0);
$f_issue_number = Input::Get('f_issue_number', 'int', 0);
$f_language_id = Input::Get('f_language_id', 'int', 0);
$f_section_number = Input::Get('f_section_number', 'int', 0);
$f_delete_all_section_translations = Input::Get('f_delete_all_section_translations', 'string', '', true);
$f_delete_all_articles_translations = Input::Get('f_delete_all_articles_translations', 'string', '', true);
$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);
$sectionName = $sectionObj->getName();
$articles = Article::GetArticles($f_publication_id, $f_issue_number, $f_section_number, $f_language_id);
$numArticles = count($articles);
$numArticlesDeleted = 0;
$f_delete_all_section_translations = $f_delete_all_section_translations == 'Y' ? true : false;
$f_delete_all_articles_translations = $f_delete_all_articles_translations == 'Y' ? true : false;
if ($f_delete_all_section_translations == false) {
    $numArticlesDeleted = $sectionObj->delete(true, $f_delete_all_articles_translations);
    $cacheService = \Zend_Registry::get('container')->getService('newscoop.cache');
    $cacheService->clearNamespace('section');
} else {
    $sectionTranslations = Section::GetSections($f_publication_id, $f_issue_number, null, null, $sectionObj->getName(), null);
    foreach ($sectionTranslations as $key => $sectionTranslation) {
        $numArticlesDeleted += $sectionTranslation->delete(true, $f_delete_all_articles_translations);
    }
}
开发者ID:sourcefabric,项目名称:newscoop,代码行数:31,代码来源:do_del.php


注:本文中的Section::getName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。