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


PHP Issue::delete方法代码示例

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


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

示例1: events

$issuePublishEvent->dumpToHtml();

echo "Executing pending events:<br>";
$events = IssuePublish::GetPendingActions();
foreach ($events as $event) {
    $event->doAction();
    $event->dumpToHtml();
}

// Check if issues are published
echo "Is the issue published?<br>";
$issue->fetch();
$issue->dumpToHtml();

// Are the articles published?
echo "Are the articles published?<br>";
$article1->fetch();
$article1->dumpToHtml();
$article2->fetch();
$article2->dumpToHtml();

echo "Number of remaining events (should be zero): ".count(IssuePublish::GetPendingActions())."<br>";

echo "Deleting objects.<br>";
$issue->delete();
$article1->delete();
$article2->delete();
$issuePublishEvent->delete();

echo "done.<br>";
?>
开发者ID:nistormihai,项目名称:Newscoop,代码行数:31,代码来源:test_autopublish.php

示例2: Delete

 /**
  * method Delete()
  * Delete a record
  */
 function Delete($param)
 {
     try {
         // security check
         TTransaction::open('changeman');
         if (Member::newFromLogin(TSession::getValue('login'))->role_mnemonic !== 'ADMINISTRATOR') {
             throw new Exception(_t('Permission denied'));
         }
         TTransaction::close();
         // get the parameter $key
         $key = $param['key'];
         // open a transaction with database 'changeman'
         TTransaction::open('changeman');
         // instantiates object Issue
         $object = new Issue($key);
         // deletes the object from the database
         $object->delete();
         // close the transaction
         TTransaction::close();
         // reload the listing
         $this->onReload();
         // shows the success message
         new TMessage('info', TAdiantiCoreTranslator::translate('Record deleted'));
     } catch (Exception $e) {
         // shows the exception error message
         new TMessage('error', '<b>Error</b> ' . $e->getMessage());
         // undo all pending operations
         TTransaction::rollback();
     }
 }
开发者ID:jfrank1500,项目名称:curso_php,代码行数:34,代码来源:IssueList.class.php

示例3: Publication

	camp_html_display_error(getGS('You do not have the right to delete issues.'));
	exit;
}

$f_publication_id = Input::Get('f_publication_id', 'int');
$f_issue_number = Input::Get('f_issue_number', 'int');
$f_language_id = Input::Get('f_language_id', 'int');

if (!Input::IsValid()) {
	camp_html_display_error(getGS('Invalid Input: $1', Input::GetErrorString()));
	exit;
}
$publicationObj = new Publication($f_publication_id);
$issueObj = new Issue($f_publication_id, $f_language_id, $f_issue_number);

$numArticlesDeleted = $issueObj->delete(true, true);

$tmpArray = array("Pub" => $publicationObj, "Issue"=> $issueObj);
camp_html_content_top(getGS("Deleted issue"), $tmpArray);
?>

<P>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="8" class="message_box">
<TR>
	<TD>
		<B> <?php  putGS("Deleted issue"); ?> </B>
		<HR NOSHADE SIZE="1" COLOR="BLACK">
	</TD>
</TR>
<TR>
	<TD>
开发者ID:nistormihai,项目名称:Newscoop,代码行数:31,代码来源:do_del.php

示例4: killIssue

 function killIssue()
 {
     // We delete the issue, cause there is no chance anybody can get to it without the expert view
     if (!Config::get()->RESOURCES_ENABLE_EXPERT_SCHEDULE_VIEW) {
         if ($issue_ids = $this->getIssueIDs()) {
             foreach ($issue_ids as $issue_id) {
                 // delete this issue
                 unset($this->issues[$issue_id]);
                 $issue = new Issue(array('issue_id' => $issue_id));
                 $issue->delete();
             }
         }
     }
 }
开发者ID:ratbird,项目名称:hope,代码行数:14,代码来源:SingleDate.class.php

示例5: delete

 public function delete($issue_id)
 {
     $this->load->model('Issue');
     $issue = new Issue();
     $issue->load($issue_id);
     if (!$issue->issue_id) {
         show_404();
     }
     $issue->delete();
     $this->load->view('bootstrap/main', ['main' => 'magazines/magazine_deleted', 'issue_id' => $issue_id]);
 }
开发者ID:TraianAlex,项目名称:ci31,代码行数:11,代码来源:magazine.php

示例6: delete

 public function delete($issue_id)
 {
     $this->load->helper('url');
     $this->load->library('session');
     $this->load->model('My_User');
     $this->load->library('table');
     $this->load->model(array('Issue', 'Publication'));
     $this->load->view('bootstrap/header');
     $this->load->helper('html');
     $this->load->model(array('Issue'));
     $issue = new Issue();
     $issue->load($issue_id);
     if (!$issue->issue_id) {
         show_404();
     }
     $issue->delete();
     $this->load->view('issue_deleted', array('issue_id' => $issue_id));
     $this->load->view('bootstrap/footer');
 }
开发者ID:syedashadi,项目名称:Magazines,代码行数:19,代码来源:magazine.php


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