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