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


PHP AdminController::processDelete方法代码示例

本文整理汇总了PHP中AdminController::processDelete方法的典型用法代码示例。如果您正苦于以下问题:PHP AdminController::processDelete方法的具体用法?PHP AdminController::processDelete怎么用?PHP AdminController::processDelete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AdminController的用法示例。


在下文中一共展示了AdminController::processDelete方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: processDelete

 /**
  * @see AdminController::processDelete()
  */
 public function processDelete()
 {
     $object = $this->loadObject();
     if (!$this->checkDeletion($object)) {
         return false;
     }
     return parent::processDelete();
 }
开发者ID:jpodracky,项目名称:dogs,代码行数:11,代码来源:AdminCurrenciesController.php

示例2: processDelete

 public function processDelete()
 {
     $object = $this->loadObject();
     if (!$this->checkDeletion($object)) {
         return false;
     }
     if (!$this->deleteNoPictureImages((int) $object->id)) {
         $this->errors[] = Tools::displayError('An error occurred while deleting the object.') . ' <b>' . $this->table . '</b> ';
     }
     return parent::processDelete();
 }
开发者ID:IngenioContenidoDigital,项目名称:americana,代码行数:11,代码来源:AdminLanguagesController.php

示例3: processDelete

 public function processDelete()
 {
     if (!Validate::isLoadedObject($object = $this->loadObject())) {
         $this->errors[] = Tools::displayError('Unable to load this shop.');
     } else {
         if (!Shop::hasDependency($object->id)) {
             $result = Category::deleteCategoriesFromShop($object->id) && parent::processDelete();
             Tools::generateHtaccess();
             return $result;
         } else {
             $this->errors[] = Tools::displayError('You can\'t delete this shop (customer and/or order dependency).');
         }
     }
     return false;
 }
开发者ID:gks-stage,项目名称:prestashop,代码行数:15,代码来源:AdminShopController.php

示例4: processDelete

 /**
  * @see AdminController::processDelete();
  */
 public function processDelete()
 {
     if (Tools::isSubmit('delete' . $this->table)) {
         /** @var Warehouse $obj */
         // check if the warehouse exists and can be deleted
         if (!($obj = $this->loadObject(true))) {
             return;
         } elseif ($obj->getQuantitiesOfProducts() > 0) {
             // not possible : products
             $this->errors[] = $this->l('It is not possible to delete a warehouse when there are products in it.');
         } elseif (SupplyOrder::warehouseHasPendingOrders($obj->id)) {
             // not possible : supply orders
             $this->errors[] = $this->l('It is not possible to delete a Warehouse if it has pending supply orders.');
         } else {
             // else, it can be deleted
             // sets the address of the warehouse as deleted
             $address = new Address($obj->id_address);
             $address->deleted = 1;
             $address->save();
             // removes associations with carriers/shops/products location
             $obj->setCarriers(array());
             $obj->resetProductsLocations();
             return parent::processDelete();
         }
     }
 }
开发者ID:prestanesia,项目名称:PrestaShop,代码行数:29,代码来源:AdminWarehousesController.php

示例5: processDelete

 public function processDelete()
 {
     $res = parent::processDelete();
     if (Tools::isSubmit('delete' . $this->table)) {
         $back = urldecode(Tools::getValue('back', ''));
         if (!empty($back)) {
             $this->redirect_after = $back;
         }
     }
     return $res;
 }
开发者ID:ortegon000,项目名称:tienda,代码行数:11,代码来源:AdminCartRulesController.php

示例6: processDelete

 public function processDelete()
 {
     if (!$this->canModifyEmployee()) {
         return false;
     }
     return parent::processDelete();
 }
开发者ID:ortegon000,项目名称:tienda,代码行数:7,代码来源:AdminEmployeesController.php

示例7: processDelete

 public function processDelete()
 {
     $id_parent = BlogCategory::getRootCategory();
     $id_parent = $id_parent['id_smart_blog_category'];
     if ((int) Tools::getValue('id_smart_blog_category') == (int) $id_parent) {
         $this->errors[] = $this->l('You cannot delete this category because it is the root category');
     } else {
         parent::processDelete();
     }
 }
开发者ID:johnulist,项目名称:smartblog,代码行数:10,代码来源:AdminBlogCategoryController.php

示例8: processDelete

 public function processDelete()
 {
     $category = $this->loadObject();
     if ($this->tabAccess['delete'] === '1') {
         if ($category->isRootCategoryForAShop()) {
             $this->errors[] = Tools::displayError('You cannot remove this category because a shop uses this category as a root category.');
         } else {
             if (parent::processDelete()) {
                 $this->setDeleteMode();
                 $this->processFatherlessProducts((int) $category->id_parent);
                 return true;
             } else {
                 return false;
             }
         }
     } else {
         $this->errors[] = Tools::displayError('You do not have permission to delete here.');
     }
 }
开发者ID:jicheng17,项目名称:pengwine,代码行数:19,代码来源:AdminCategoriesController.php

示例9: processDelete

 public function processDelete()
 {
     $obj = $this->loadObject();
     if ($obj && $obj->isUsed()) {
         $this->errors[] = $this->l('This theme is already used by at least one shop. Please choose another theme first.');
         return false;
     }
     return parent::processDelete();
 }
开发者ID:jicheng17,项目名称:vipinsg,代码行数:9,代码来源:AdminThemesController.php

示例10: processDelete

 public function processDelete()
 {
     $obj = $this->loadObject();
     if ($obj) {
         if ($obj->isUsed()) {
             $this->errors[] = $this->l('The theme is being used by at least one shop. Please choose another theme before continuing.');
             return false;
         }
         $themes = array();
         foreach (Theme::getThemes() as $theme) {
             if ($theme->id != $obj->id) {
                 $themes[] = $theme->directory;
             }
         }
         if (is_dir(_PS_ALL_THEMES_DIR_ . $obj->directory) && !in_array($obj->directory, $themes)) {
             Tools::deleteDirectory(_PS_ALL_THEMES_DIR_ . $obj->directory . '/');
         }
         $ids_themes = Tools::unSerialize(Configuration::get('PS_ADDONS_THEMES_IDS'));
         if (array_key_exists($obj->directory, $ids_themes)) {
             unset($ids_themes[$obj->directory]);
         }
         $obj->removeMetas();
     } elseif ($obj === false && ($theme_dir = Tools::getValue('theme_dir'))) {
         $theme_dir = basename($theme_dir);
         if (Tools::deleteDirectory(_PS_ALL_THEMES_DIR_ . $theme_dir . '/')) {
             Tools::redirectAdmin(Context::getContext()->link->getAdminLink('AdminThemes') . '&conf=2');
         } else {
             $this->errors[] = Tools::displayError('The folder cannot be deleted');
         }
     }
     return parent::processDelete();
 }
开发者ID:NathanGiesbrecht,项目名称:PrestaShopAutomationFramework,代码行数:32,代码来源:AdminThemesController.php

示例11: processDelete

 /**
  * Object Delete
  */
 public function processDelete()
 {
     if (Validate::isLoadedObject($object = $this->loadObject())) {
         /** @var Address $object */
         if (!$object->isUsed()) {
             $this->deleted = false;
         }
     }
     $res = parent::processDelete();
     if ($back = Tools::getValue('back')) {
         $this->redirect_after = urldecode($back) . '&conf=1';
     }
     return $res;
 }
开发者ID:M03G,项目名称:PrestaShop,代码行数:17,代码来源:AdminAddressesController.php

示例12: processDelete

 public function processDelete()
 {
     if ($this->access('delete')) {
         /** @var Category $category */
         $category = $this->loadObject();
         if ($category->isRootCategoryForAShop()) {
             $this->errors[] = $this->trans('You cannot remove this category because one of your shops uses it as a root category.', array(), 'Admin.Catalog.Notification');
         } elseif (parent::processDelete()) {
             $this->setDeleteMode();
             $this->processFatherlessProducts((int) $category->id_parent);
             return true;
         }
     } else {
         $this->errors[] = $this->trans('You do not have permission to delete this.', array(), 'Admin.Notifications.Error');
     }
     return false;
 }
开发者ID:M03G,项目名称:PrestaShop,代码行数:17,代码来源:AdminCategoriesController.php

示例13: processDelete

 public function processDelete()
 {
     $object = $this->loadObject();
     if (!$this->checkDeletion($object)) {
         return false;
     }
     if (!$this->deleteNoPictureImages((int) $object->id)) {
         $this->errors[] = $this->trans('An error occurred while deleting the object.', array(), 'Admin.Notifications.Error') . ' <b>' . $this->table . '</b> ';
     }
     return parent::processDelete();
 }
开发者ID:M03G,项目名称:PrestaShop,代码行数:11,代码来源:AdminLanguagesController.php

示例14: processDelete

 public function processDelete()
 {
     $obj = $this->loadObject();
     if ($obj && is_dir(_PS_ALL_THEMES_DIR_ . $obj->directory)) {
         Tools::deleteDirectory(_PS_ALL_THEMES_DIR_ . $obj->directory . '/');
     }
     if ($obj && $obj->isUsed()) {
         $this->errors[] = $this->l('This theme is already used by at least one shop. Please choose another theme first.');
         return false;
     }
     return parent::processDelete();
 }
开发者ID:rrameshsat,项目名称:Prestashop,代码行数:12,代码来源:AdminThemesController.php

示例15: processDelete

 public function processDelete()
 {
     parent::processDelete();
     return $this->getQuickAccessesList();
 }
开发者ID:zangles,项目名称:lennyba,代码行数:5,代码来源:AdminQuickAccessesController.php


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