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


PHP Currency::delete方法代码示例

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


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

示例1: deleteSelection

 public function deleteSelection($selection)
 {
     if (!is_array($selection) or !Validate::isTableOrIdentifier($this->identifier) or !Validate::isTableOrIdentifier($this->table)) {
         die(Tools::displayError());
     }
     foreach ($selection as $id) {
         $obj = new Currency((int) $id);
         $res[$id] = $obj->delete();
     }
     foreach ($res as $value) {
         if (!$value) {
             return false;
         }
     }
     return true;
 }
开发者ID:yiuked,项目名称:tmcart,代码行数:16,代码来源:Currency.php

示例2: delete

 /**
  * Delete existing currency
  *
  * @param void
  * @return null
  */
 function delete()
 {
     if ($this->active_currency->isNew()) {
         $this->httpError(HTTP_ERR_NOT_FOUND);
     }
     // if
     if ($this->request->isSubmitted()) {
         $delete = $this->active_currency->delete();
         if ($delete && !is_error($delete)) {
             flash_success('Currency ":name" has been deleted', array('name' => $this->active_currency->getName()));
         } else {
             flash_error('Failed to delete ":name" currency', array('name' => $this->active_currency->getName()));
         }
         // if
         $this->redirectTo('admin_currencies');
     } else {
         $this->httpError(HTTP_ERR_BAD_REQUEST);
     }
     // if
 }
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:26,代码来源:CurrenciesAdminController.class.php

示例3: storeCurrencies

 /**
  * Stores the Currencies as present in the POST request
  *
  * See {@see Currency::delete()},
  * {@see Currency::add()}, and
  * {@see Currency::update()}.
  */
 static function storeCurrencies()
 {
     //DBG::log("start of storeCurrencies: ".self::$success.", changed: ".self::$changed);
     $result = Currency::delete();
     if (isset($result)) {
         self::$changed = true;
         self::$success &= $result;
     }
     //DBG::log("after delete: ".self::$success.", changed: ".self::$changed);
     $result = Currency::add();
     if (isset($result)) {
         self::$changed = true;
         self::$success &= $result;
     }
     //DBG::log("after add: ".self::$success.", changed: ".self::$changed);
     $result = Currency::update();
     if (isset($result)) {
         self::$changed = true;
         self::$success &= $result;
     }
     //DBG::log("after update: ".self::$success.", changed: ".self::$changed);
     if (self::$changed) {
         // Remember to reinit the Currencies, or the User
         // won't see changes instantly
         Currency::reset();
     }
 }
开发者ID:Cloudrexx,项目名称:cloudrexx,代码行数:34,代码来源:ShopSettings.class.php

示例4: deleteSelection

 public function deleteSelection($selection)
 {
     if (!is_array($selection)) {
         die(Tools::displayError());
     }
     foreach ($selection as $id) {
         $obj = new Currency((int) $id);
         $res[$id] = $obj->delete();
     }
     foreach ($res as $value) {
         if (!$value) {
             return false;
         }
     }
     return true;
 }
开发者ID:FAVHYAN,项目名称:a3workout,代码行数:16,代码来源:Currency.php

示例5: deleteSelection

 public function deleteSelection($selection)
 {
     if (!is_array($selection)) {
         return false;
     }
     $res = array();
     foreach ($selection as $id) {
         $obj = new Currency((int) $id);
         $res[$id] = $obj->delete();
     }
     foreach ($res as $value) {
         if (!$value) {
             return false;
         }
     }
     return true;
 }
开发者ID:carloslastresDev,项目名称:HealthyTaiwan_UsingPrestaShop,代码行数:17,代码来源:Currency.php


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