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


PHP self::deleteByCriteria方法代码示例

本文整理汇总了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;
 }
开发者ID:nsautier,项目名称:positions,代码行数:7,代码来源:position.class.php

示例2: cleanForItem

   static function cleanForItem(CommonDBTM $item) {

      $temp = new self();
      $temp->deleteByCriteria(
         array('itemtype' => $item->getType(),
               'items_id' => $item->getField('id'))
      );
   }
开发者ID:euqip,项目名称:glpi-smartcities,代码行数:8,代码来源:certificate_item.class.php

示例3: purgeProfiles

 static function purgeProfiles(Profile $prof)
 {
     $plugprof = new self();
     $plugprof->deleteByCriteria(array('profiles_id' => $prof->getField("id")));
 }
开发者ID:geldarr,项目名称:hack-space,代码行数:5,代码来源:profile.class.php

示例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);
 }
开发者ID:Ixertec,项目名称:glpi,代码行数:13,代码来源:profile_user.class.php

示例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));
 }
开发者ID:JULIO8,项目名称:respaldo_glpi,代码行数:29,代码来源:info.class.php

示例6: cleanForOcsServer

 function cleanForOcsServer($ID)
 {
     $temp = new self();
     $temp->deleteByCriteria(array('plugin_ocsinventoryng_ocsservers_id' => $ID));
 }
开发者ID:JULIO8,项目名称:respaldo_glpi,代码行数:5,代码来源:ocsadmininfoslink.class.php

示例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")));
 }
开发者ID:JULIO8,项目名称:respaldo_glpi,代码行数:12,代码来源:ocslink.class.php

示例8: cleanDBonPurge

 /**
  *
  */
 function cleanDBonPurge()
 {
     $self = new self();
     $self->deleteByCriteria(array('computers_id' => $this->fields['id']));
 }
开发者ID:pluginsGLPI,项目名称:ocsinventoryng,代码行数:8,代码来源:registrykey.class.php

示例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()));
 }
开发者ID:pluginsGLPI,项目名称:ocsinventoryng,代码行数:12,代码来源:snmpocslink.class.php

示例10: deleteUserPreferences

 /**
  * @param $users_id
  **/
 static function deleteUserPreferences($users_id)
 {
     $preference = new self();
     $preference->deleteByCriteria(array('users_id' => $users_id));
 }
开发者ID:pluginsGLPI,项目名称:uninstall,代码行数:8,代码来源:preference.class.php

示例11: deleteProfile

 static function deleteProfile(Profile $profile)
 {
     $fields_profile = new self();
     $fields_profile->deleteByCriteria(array('profiles_id' => $profile->fields['id']));
     return true;
 }
开发者ID:publik1974,项目名称:fields,代码行数:6,代码来源:profile.class.php

示例12: deleteThreadDetailsByProcessID

 /**
  * @param $threads_id
  **/
 static function deleteThreadDetailsByProcessID($threads_id)
 {
     $temp = new self();
     $temp->deleteByCriteria(array('plugin_ocsinventoryng_threads_id' => $threads_id));
 }
开发者ID:JULIO8,项目名称:respaldo_glpi,代码行数:8,代码来源:detail.class.php

示例13: unregisterNewItemType

 static function unregisterNewItemType($itemtype)
 {
     if (countElementsInTable(getTableForItemType(__CLASS__), "`itemtype`='{$itemtype}'")) {
         $config = new self();
         $config->deleteByCriteria(array('itemtype' => $itemtype));
     }
 }
开发者ID:paisdelconocimiento,项目名称:glpi-smartcities,代码行数:7,代码来源:configfield.class.php

示例14: purgeItem

 static function purgeItem($item)
 {
     $temp = new self();
     $temp->deleteByCriteria(array('documentcategories_id' => $item->getField("id")));
 }
开发者ID:equinoxefr,项目名称:order,代码行数:5,代码来源:documentcategory.class.php

示例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));
 }
开发者ID:geldarr,项目名称:hack-space,代码行数:10,代码来源:profile.class.php


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