[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 abstract class PhortuneCartController 4 extends PhortuneController { 5 6 protected function buildCartContentTable(PhortuneCart $cart) { 7 8 $rows = array(); 9 foreach ($cart->getPurchases() as $purchase) { 10 $rows[] = array( 11 $purchase->getFullDisplayName(), 12 $purchase->getBasePriceAsCurrency()->formatForDisplay(), 13 $purchase->getQuantity(), 14 $purchase->getTotalPriceAsCurrency()->formatForDisplay(), 15 ); 16 } 17 18 $rows[] = array( 19 phutil_tag('strong', array(), pht('Total')), 20 '', 21 '', 22 phutil_tag('strong', array(), 23 $cart->getTotalPriceAsCurrency()->formatForDisplay()), 24 ); 25 26 $table = new AphrontTableView($rows); 27 $table->setHeaders( 28 array( 29 pht('Item'), 30 pht('Price'), 31 pht('Qty.'), 32 pht('Total'), 33 )); 34 $table->setColumnClasses( 35 array( 36 'wide', 37 'right', 38 'right', 39 'right', 40 )); 41 42 return $table; 43 } 44 45 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |