本文整理汇总了PHP中eZOrder::attribute方法的典型用法代码示例。如果您正苦于以下问题:PHP eZOrder::attribute方法的具体用法?PHP eZOrder::attribute怎么用?PHP eZOrder::attribute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZOrder
的用法示例。
在下文中一共展示了eZOrder::attribute方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testIssue18233
public function testIssue18233()
{
// insert orders
$orderData = array('account_identifier' => 'ez', 'created' => 130252369, 'data_text_1' => '\\<?xml ?\\>', 'email' => 'xc@ez.no', 'productcollection_id' => '5', 'status_modifier_id' => '14', 'user_id' => 14);
$order = new eZOrder($orderData);
$order->store();
$oldOrderNR = $order->attribute('order_nr');
$order->activate();
$this->assertEquals($oldOrderNR + 1, $order->attribute('id'));
$this->assertEquals(0, $order->attribute('is_temporary'));
}
示例2: createOrder
function createOrder()
{
// Make order
$productCollectionID = $this->attribute('productcollection_id');
$user = eZUser::currentUser();
$userID = $user->attribute('contentobject_id');
$time = time();
$order = new eZOrder(array('productcollection_id' => $productCollectionID, 'user_id' => $userID, 'is_temporary' => 1, 'created' => $time, 'status_id' => eZOrderStatus::PENDING, 'status_modified' => $time, 'status_modifier_id' => $userID));
$db = eZDB::instance();
$db->begin();
$order->store();
$orderID = $order->attribute('id');
$this->setAttribute('order_id', $orderID);
$this->store();
$db->commit();
return $order;
}