Differential D20733 Diff 49440 src/applications/phortune/controller/account/PhortuneAccountProfileController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phortune/controller/account/PhortuneAccountProfileController.php
Show First 20 Lines • Show All 111 Lines • ▼ Show 20 Lines | $carts = id(new PhortuneCartQuery()) | ||||
PhortuneCart::STATUS_CHARGED, | PhortuneCart::STATUS_CHARGED, | ||||
PhortuneCart::STATUS_HOLD, | PhortuneCart::STATUS_HOLD, | ||||
PhortuneCart::STATUS_REVIEW, | PhortuneCart::STATUS_REVIEW, | ||||
PhortuneCart::STATUS_PURCHASED, | PhortuneCart::STATUS_PURCHASED, | ||||
)) | )) | ||||
->setLimit($limit) | ->setLimit($limit) | ||||
->execute(); | ->execute(); | ||||
$phids = array(); | |||||
foreach ($carts as $cart) { | |||||
$phids[] = $cart->getPHID(); | |||||
foreach ($cart->getPurchases() as $purchase) { | |||||
$phids[] = $purchase->getPHID(); | |||||
} | |||||
} | |||||
$handles = $this->loadViewerHandles($phids); | |||||
$orders_uri = $account->getOrderListURI(); | $orders_uri = $account->getOrderListURI(); | ||||
$table = id(new PhortuneOrderTableView()) | $table = id(new PhortuneOrderTableView()) | ||||
->setUser($viewer) | ->setUser($viewer) | ||||
->setCarts($carts) | ->setCarts($carts); | ||||
->setHandles($handles); | |||||
$header = id(new PHUIHeaderView()) | $header = id(new PHUIHeaderView()) | ||||
->setHeader(pht('Recent Orders')) | ->setHeader(pht('Recent Orders')) | ||||
->addActionLink( | ->addActionLink( | ||||
id(new PHUIButtonView()) | id(new PHUIButtonView()) | ||||
->setTag('a') | ->setTag('a') | ||||
->setIcon('fa-list') | ->setIcon('fa-list') | ||||
->setHref($orders_uri) | ->setHref($orders_uri) | ||||
Show All 10 Lines |