本文整理汇总了PHP中Notepad::deleteByCriteria方法的典型用法代码示例。如果您正苦于以下问题:PHP Notepad::deleteByCriteria方法的具体用法?PHP Notepad::deleteByCriteria怎么用?PHP Notepad::deleteByCriteria使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Notepad
的用法示例。
在下文中一共展示了Notepad::deleteByCriteria方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: deleteNotepad
/**
* Delete all notes associated with a itemtype
* @param the itemtype
* @return nothing
*/
public static function deleteNotepad($itemtype)
{
$notepad = new Notepad();
$notepad->deleteByCriteria(array('itemtype' => $itemtype));
}
示例2: delete
/**
* Delete an item in the database.
*
* @see CommonDBTM::delete()
*
* @param $input array the _POST vars returned by the item form when press delete
* @param $force boolean force deletion (default 0)
* @param $history boolean do history log ? (default 1)
*
* @return boolean : true on success
**/
function delete(array $input, $force = 0, $history = 1)
{
$deleteSuccessful = parent::delete($input, $force, $history);
if ($deleteSuccessful != false) {
if ($force == 1) {
$notepad = new Notepad();
$notepad->deleteByCriteria(array('itemtype' => 'PluginSimcardSimcard', 'items_id' => $input['id']));
}
}
return $deleteSuccessful;
}