本文整理汇总了PHP中eZOrder::cleanupOrder方法的典型用法代码示例。如果您正苦于以下问题:PHP eZOrder::cleanupOrder方法的具体用法?PHP eZOrder::cleanupOrder怎么用?PHP eZOrder::cleanupOrder使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZOrder
的用法示例。
在下文中一共展示了eZOrder::cleanupOrder方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
<?php
/**
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version 2014.11.1
* @package kernel
*/
$Module = $Params['Module'];
$http = eZHTTPTool::instance();
$deleteIDArray = $http->sessionVariable("DeleteOrderIDArray");
if ($http->hasPostVariable("ConfirmButton")) {
$db = eZDB::instance();
$db->begin();
foreach ($deleteIDArray as $deleteID) {
eZOrder::cleanupOrder($deleteID);
}
$db->commit();
$Module->redirectTo('/shop/orderlist/');
} elseif ($http->hasPostVariable("CancelButton")) {
$Module->redirectTo('/shop/orderlist/');
} else {
$orderNumbersArray = array();
foreach ($deleteIDArray as $orderID) {
$order = eZOrder::fetch($orderID);
if ($order === null) {
continue;
}
// just to prevent possible fatal error below
$orderNumbersArray[] = $order->attribute('order_nr');
}