當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ModuleAdminController::processBulkDelete方法代碼示例

本文整理匯總了PHP中ModuleAdminController::processBulkDelete方法的典型用法代碼示例。如果您正苦於以下問題:PHP ModuleAdminController::processBulkDelete方法的具體用法?PHP ModuleAdminController::processBulkDelete怎麽用?PHP ModuleAdminController::processBulkDelete使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ModuleAdminController的用法示例。


在下文中一共展示了ModuleAdminController::processBulkDelete方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: processBulkDelete

 /**
  * @return bool
  */
 protected function processBulkDelete()
 {
     if (is_array($this->boxes) && !empty($this->boxes)) {
         foreach ($this->boxes as $iIdNowBlockCustomerReferences) {
             $oNowBlockCustomerReferences = new NowBlockCustomerReferences((int) $iIdNowBlockCustomerReferences);
             if (!$oNowBlockCustomerReferences->deleteImage()) {
                 $this->errors[] = Tools::displayError('An error occurred while deleting image of the object (NowBlockCustomerReferences).') . ' <b>' . $this->table . '</b> ';
                 return false;
             }
         }
     }
     return parent::processBulkDelete();
 }
開發者ID:TheTypoMaster,項目名稱:neonflexible,代碼行數:16,代碼來源:AdminBlockCustomerReferences.php

示例2: processBulkDelete

 protected function processBulkDelete()
 {
     if (is_array($this->boxes) && !empty($this->boxes)) {
         foreach ($this->boxes as $key => $value) {
             $obj_branch_features = new HotelBranchFeatures();
             $obj_htl_cart_data = new HotelCartBookingData();
             $obj_htl_img = new HotelImage();
             $obj_htl_rm_info = new HotelRoomInformation();
             $obj_htl_rm_type = new HotelRoomType();
             $ids_product = $obj_htl_rm_type->getIdProductByHotelId($value);
             if (isset($ids_product) && $ids_product) {
                 foreach ($ids_product as $key_prod => $value_prod) {
                     $delete_cart_data = $obj_htl_cart_data->deleteBookingCartDataNotOrderedByProductId($value_prod['id_product']);
                     $delete_room_info = $obj_htl_rm_info->deleteByProductId($value_prod['id_product']);
                     $delete_room_type = $obj_htl_rm_type->deleteByProductId($value_prod['id_product']);
                     $obj_product = new Product($value_prod['id_product']);
                     $delete_product = $obj_product->delete();
                 }
             }
             $delete_branch_features = $obj_branch_features->deleteBranchFeaturesByHotelId($object->id);
             $htl_all_images = $obj_htl_img->getAllImagesByHotelId($object->id);
             foreach ($htl_all_images as $key_img => $value_img) {
                 $path_img = _PS_MODULE_DIR_ . 'hotelreservationsystem/views/img/hotel_img/' . $value_img['hotel_image_id'] . '.jpg';
                 @unlink($path_img);
             }
             $delete_htl_img = $obj_htl_img->deleteByHotelId($object->id);
         }
         parent::processBulkDelete();
     } else {
         $this->errors[] = Tools::displayError('You must select at least one element to delete.');
     }
 }
開發者ID:Rohit-jn,項目名稱:hotelcommerce,代碼行數:32,代碼來源:AdminAddHotelController.php


注:本文中的ModuleAdminController::processBulkDelete方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。