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


PHP AdminController::afterUpdate方法代码示例

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


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

示例1: afterUpdate

 protected function afterUpdate($new_shop)
 {
     $categories = Tools::getValue('categoryBox');
     array_unshift($categories, Configuration::get('PS_ROOT_CATEGORY'));
     if (!Category::updateFromShop($categories, $new_shop->id)) {
         $this->errors[] = $this->l('You need to select at least the root category.');
     }
     if (Tools::getValue('useImportData') && ($import_data = Tools::getValue('importData')) && is_array($import_data)) {
         $new_shop->copyShopData((int) Tools::getValue('importFromShop'), $import_data);
     }
     return parent::afterUpdate($new_shop);
 }
开发者ID:gks-stage,项目名称:prestashop,代码行数:12,代码来源:AdminShopController.php

示例2: afterUpdate

 /**
  * @param Employee $object
  *
  * @return bool
  */
 protected function afterUpdate($object)
 {
     $res = parent::afterUpdate($object);
     // Update cookie if needed
     if (Tools::getValue('id_employee') == $this->context->employee->id && ($passwd = Tools::getValue('passwd')) && $object->passwd != $this->context->employee->passwd) {
         $this->context->cookie->passwd = $this->context->employee->passwd = $object->passwd;
         if (Tools::getValue('passwd_send_email')) {
             $params = array('{email}' => $object->email, '{lastname}' => $object->lastname, '{firstname}' => $object->firstname, '{passwd}' => $passwd);
             Mail::Send($object->id_lang, 'password', Mail::l('Your new password', $object->id_lang), $params, $object->email, $object->firstname . ' ' . $object->lastname);
         }
     }
     return $res;
 }
开发者ID:ortegon000,项目名称:tienda,代码行数:18,代码来源:AdminEmployeesController.php

示例3: afterUpdate

 protected function afterUpdate($object)
 {
     $res = parent::afterUpdate($object);
     // Update cookie if needed
     if (Tools::getValue('id_employee') == $this->context->employee->id && Tools::getValue('passwd') && $object->passwd != $this->context->employee->passwd) {
         $this->context->cookie->passwd = $this->context->employee->passwd = $object->passwd;
     }
     return $res;
 }
开发者ID:dev-lav,项目名称:htdocs,代码行数:9,代码来源:AdminEmployeesController.php

示例4: afterUpdate

 /**
  * @param Shop $new_shop
  * @return bool
  */
 protected function afterUpdate($new_shop)
 {
     $categories = Tools::getValue('categoryBox');
     if (!is_array($categories)) {
         $this->errors[] = $this->l('Please create some sub-categories for this root category.');
         return false;
     }
     array_unshift($categories, Configuration::get('PS_ROOT_CATEGORY'));
     if (!Category::updateFromShop($categories, $new_shop->id)) {
         $this->errors[] = $this->l('You need to select at least the root category.');
     }
     if (Tools::getValue('useImportData') && ($import_data = Tools::getValue('importData')) && is_array($import_data)) {
         $new_shop->copyShopData((int) Tools::getValue('importFromShop'), $import_data);
     }
     if (Tools::isSubmit('submitAddshopAndStay') || Tools::isSubmit('submitAddshop')) {
         $this->redirect_after = self::$currentIndex . '&shop_id=' . (int) $new_shop->id . '&conf=4&token=' . $this->token;
     }
     return parent::afterUpdate($new_shop);
 }
开发者ID:nmardones,项目名称:PrestaShop,代码行数:23,代码来源:AdminShopController.php

示例5: afterUpdate

 protected function afterUpdate($new_shop)
 {
     if (!Category::updateFromShop(Tools::getValue('categoryBox'), $new_shop->id)) {
         $this->errors[] = $this->l('You need to select at least the root category.');
     }
     if (Tools::getValue('useImportData') && ($import_data = Tools::getValue('importData')) && is_array($import_data)) {
         $new_shop->copyShopData((int) Tools::getValue('importFromShop'), $import_data);
     }
     return parent::afterUpdate($new_shop);
 }
开发者ID:rrameshsat,项目名称:Prestashop,代码行数:10,代码来源:AdminShopController.php


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