public function __construct($options = array(), $CSRFSecret = null) { $this->old_series = Doctrine::getTable('Series')->findAll(); $forms = array(); foreach ($this->old_series as $series) { $forms['old_' . $series->id] = new SeriesForm($series, $options, false); } parent::__construct($forms, 'SeriesForm', $options, $CSRFSecret); }
public function __construct($options = array(), $CSRFSecret = null) { $this->old_taxes = Doctrine::getTable('Tax')->findAll(); $forms = array(); foreach ($this->old_taxes as $tax) { $forms['old_' . $tax->getId()] = new TaxForm($tax, $options, false); } parent::__construct($forms, 'TaxForm', $options, $CSRFSecret); }
public function __construct($invoice_id = null, $options = array(), $CSRFSecret = null) { if ($invoice_id) { $this->old_payments = Doctrine::getTable('Payment')->createQuery()->where('invoice_id = ?', $invoice_id)->orderBy('date')->execute(); $forms = array(); foreach ($this->old_payments as $payment) { $forms['old_' . $payment->getId()] = new PaymentForm($payment, $options, false); } } parent::__construct($forms, 'PaymentForm', $options, $CSRFSecret); }