private function getElementSeatingPlan($seatingPlan)
 {
     $el = new ElementSelect('seatingPlan', 'Seating Plan');
     $el->addOption('(none)', null);
     $sql = 'SELECT sp.id, sp.name FROM seatingplans sp ORDER BY sp.name ASC';
     $stmt = DatabaseFactory::getInstance()->prepare($sql);
     $stmt->execute();
     foreach ($stmt->fetchAll() as $itemSeatingPlan) {
         $el->addOption($itemSeatingPlan['name'], $itemSeatingPlan['id']);
     }
     $el->setValue($seatingPlan);
     return $el;
 }
 private function addAccountAllocation($paymentType, $title)
 {
     $el = new ElementSelect($paymentType, $title);
     foreach ($this->availableAccounts as $account) {
         $el->addOption($account['title'], $account['id']);
     }
     if (isset($this->availableAccounts[$paymentType])) {
         $el->setValue($this->availableAccounts[$paymentType]['id']);
     } else {
         $el->setvalue(1);
     }
     $this->allocatedPaymentTypes[] = array('paymentType' => $paymentType);
     $this->addElement($el);
 }