/** * loads and returns the cbpaidPaymentItem's of this cbPaymentBasket * they are cached into $this->_paymentItems as array of cbpaidPaymentItem * * @return cbpaidPaymentTotalizer[] */ public function & loadPaymentTotalizers() { global $_CB_database; if ( $this->_paymentTotalizers === null ) { $sampleItem = new cbpaidPaymentTotalizer( $_CB_database ); $this->_paymentTotalizers = $sampleItem->loadThisMatchingList( array( 'payment_basket_id' => (int) $this->id ), array( 'ordering' => 'ASC' ) ); // Now also link back to basket, as it is needed to be able to display totalizers correctly: foreach ( array_keys( $this->_paymentTotalizers ) as $k ) { $this->_paymentTotalizers[$k]->setPaymentBasketObject( $this ); } } return $this->_paymentTotalizers; }
/** * Renders a $variable for an $output * * @param mixed $variable * @param string $output * @param boolean $rounded * @return string|null */ public function renderColumn($variable, $output = 'html', $rounded = false) { if (!in_array($variable, array('rate', 'first_rate', 'validity_period', 'description')) && (is_callable('property_exists') ? property_exists($this, $variable) : property_exists($this, $variable)) && $this->{$variable} == 0) { return null; } return parent::renderColumn($variable, $output, $rounded); }