本文整理匯總了PHP中CommonDBRelation::post_purgeItem方法的典型用法代碼示例。如果您正苦於以下問題:PHP CommonDBRelation::post_purgeItem方法的具體用法?PHP CommonDBRelation::post_purgeItem怎麽用?PHP CommonDBRelation::post_purgeItem使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CommonDBRelation
的用法示例。
在下文中一共展示了CommonDBRelation::post_purgeItem方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Ticket
function post_purgeItem()
{
$ticket = new Ticket();
$input = array('id' => $this->fields['tickets_id'], 'date_mod' => $_SESSION["glpi_currenttime"], '_donotadddocs' => true);
if (!isset($this->input['_do_notif']) || $this->input['_do_notif']) {
$input['_forcenotif'] = true;
}
$ticket->update($input);
parent::post_purgeItem();
}
示例2: Ticket
/**
* @since version 0.83
*
* @see CommonDBTM::post_purgeItem()
**/
function post_purgeItem()
{
if ($this->fields['itemtype'] == 'Ticket') {
$ticket = new Ticket();
$input = array('id' => $this->fields['items_id'], 'date_mod' => $_SESSION["glpi_currenttime"], '_donotadddocs' => true);
if (!isset($this->input['_do_notif']) || $this->input['_do_notif']) {
$input['_forcenotif'] = true;
}
//Clean ticket description if an image is in it
$doc = new Document();
$doc->getFromDB($this->fields['documents_id']);
if (!empty($doc->fields['tag'])) {
$ticket->getFromDB($this->fields['items_id']);
$input['content'] = $ticket->cleanTagOrImage($ticket->fields['content'], array($doc->fields['tag']));
}
$ticket->update($input);
}
parent::post_purgeItem();
}