3
* PurchasableTermSelectWidget.class.php
5
* This file contains the definition of the PurchasableTermSelectWidget class.
8
* @author John Diamond <jdiamond@solid-state.org>
9
* @copyright John Diamond <jdiamond@solid-state.org>
10
* @license http://www.opensource.org/licenses/gpl-license.php GNU Public License
14
* PurchasableTermSelectWidget
17
* @author John Diamond <jdiamond@solid-state.org>
19
class PurchasableTermSelectWidget extends SelectWidget
22
* @var PurchasableDBO The Purchasable to display terms for
24
protected $purchasable = null;
29
* @param array $config Field configuration
30
* @return array value => description
35
$cs = $conf['locale']['currency_symbol'];
38
foreach( $this->purchasable->getPricing( "Recurring" ) as $price )
40
$terms[$price->getID()] =
41
sprintf( "%d [MONTHS] - %s%01.2f",
42
$price->getTermLength(),
54
* @param PurchasableDBO The purchasable to display terms for
56
function setPurchasable( PurchasableDBO $purchasable )
58
$this->purchasable = $purchasable;
b'\\ No newline at end of file'