當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。