本文整理汇总了PHP中self::deleteByCriteria方法的典型用法代码示例。如果您正苦于以下问题:PHP self::deleteByCriteria方法的具体用法?PHP self::deleteByCriteria怎么用?PHP self::deleteByCriteria使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类self
的用法示例。
在下文中一共展示了self::deleteByCriteria方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: purgePositions
static function purgePositions($item)
{
$temp = new self();
$type = get_class($item);
$temp->deleteByCriteria(array('itemtype' => $type, 'items_id' => $item->getField('id')), 1);
return true;
}
示例2: cleanForItem
static function cleanForItem(CommonDBTM $item) {
$temp = new self();
$temp->deleteByCriteria(
array('itemtype' => $item->getType(),
'items_id' => $item->getField('id'))
);
}
示例3: purgeProfiles
static function purgeProfiles(Profile $prof)
{
$plugprof = new self();
$plugprof->deleteByCriteria(array('profiles_id' => $prof->getField("id")));
}
示例4: deleteRights
/**
* @param $user_ID
* @param $only_dynamic (false by default)
**/
static function deleteRights($user_ID, $only_dynamic = false)
{
$crit['users_id'] = $user_ID;
if ($only_dynamic) {
$crit['is_dynamic'] = '1';
}
$obj = new self();
$obj->deleteByCriteria($crit);
}
示例5: manageInfos
/**
* @param $models_id
* @param $infos array
**/
static function manageInfos($models_id, $infos = array())
{
global $DB;
$info = new self();
if (isset($_POST['data']) && is_array($_POST['data']) && count($_POST['data'])) {
foreach ($_POST['data'] as $id => $info_infos) {
$info_infos['id'] = $id;
//If no field selected, reset other values
if ($info_infos['value'] == PluginDatainjectionInjectionType::NO_VALUE) {
$info_infos['itemtype'] = PluginDatainjectionInjectionType::NO_VALUE;
$info_infos['is_mandatory'] = 0;
} else {
$info_infos['is_mandatory'] = isset($info_infos['is_mandatory']) ? 1 : 0;
}
if ($id > 0) {
$info->update($info_infos);
} else {
$info_infos['models_id'] = $models_id;
unset($info_infos['id']);
$info->add($info_infos);
}
}
}
$info->deleteByCriteria(array('models_id' => $models_id, 'value' => PluginDatainjectionInjectionType::NO_VALUE));
}
示例6: cleanForOcsServer
function cleanForOcsServer($ID)
{
$temp = new self();
$temp->deleteByCriteria(array('plugin_ocsinventoryng_ocsservers_id' => $ID));
}
示例7: purgeComputer
/**
* if Computer deleted
*
* @param $comp Computer object
**/
static function purgeComputer(Computer $comp)
{
$link = new self();
$link->deleteByCriteria(array('computers_id' => $comp->getField("id")));
$reg = new PluginOcsinventoryngRegistryKey();
$reg->deleteByCriteria(array('computers_id' => $comp->getField("id")));
}
示例8: cleanDBonPurge
/**
*
*/
function cleanDBonPurge()
{
$self = new self();
$self->deleteByCriteria(array('computers_id' => $this->fields['id']));
}
示例9: purgePhone
/**
* if Phone purged
*
* @param $pho Phone object
**/
static function purgePhone(Phone $pho)
{
$snmp = new self();
$snmp->deleteByCriteria(array('items_id' => $pho->getField("id"), 'itemtype' => $pho->getType()));
$ipdiscover = new PluginOcsinventoryngIpdiscoverOcslink();
$ipdiscover->deleteByCriteria(array('items_id' => $pho->getField("id"), 'itemtype' => $pho->getType()));
}
示例10: deleteUserPreferences
/**
* @param $users_id
**/
static function deleteUserPreferences($users_id)
{
$preference = new self();
$preference->deleteByCriteria(array('users_id' => $users_id));
}
示例11: deleteProfile
static function deleteProfile(Profile $profile)
{
$fields_profile = new self();
$fields_profile->deleteByCriteria(array('profiles_id' => $profile->fields['id']));
return true;
}
示例12: deleteThreadDetailsByProcessID
/**
* @param $threads_id
**/
static function deleteThreadDetailsByProcessID($threads_id)
{
$temp = new self();
$temp->deleteByCriteria(array('plugin_ocsinventoryng_threads_id' => $threads_id));
}
示例13: unregisterNewItemType
static function unregisterNewItemType($itemtype)
{
if (countElementsInTable(getTableForItemType(__CLASS__), "`itemtype`='{$itemtype}'")) {
$config = new self();
$config->deleteByCriteria(array('itemtype' => $itemtype));
}
}
示例14: purgeItem
static function purgeItem($item)
{
$temp = new self();
$temp->deleteByCriteria(array('documentcategories_id' => $item->getField("id")));
}
示例15: deleteTypeFromProfile
/**
* Delete type from the rights
* @param name the name of the type
* @return nothing
*/
public static function deleteTypeFromProfile($itemtype)
{
$profile = new self();
$profile->deleteByCriteria(array("itemtype" => $itemtype));
}