<?php
namespace App\Form\Input;

class Select_AgencyOffice extends \Engine\Form\Input\Select
{

	/**
	 * (non-PHPdoc)
	 * @see \Engine\Form\Input\Select::determinePossibleValues()
	 */
	protected function determinePossibleValues()
	{
		// get bank accounts from db
		$basObj = new \App\EntityList\Offices();
		$basObj->setColumns(['name', 'iataCode', 'countryCode',]);
		$basObj->setOrderBy('name', 'ASC');
		$basEx = $basObj->getExecution();

		// populate the possible values
		$vals = [];
		foreach($basEx as $ba) {
			$baDet = $ba['name'];
			$vals[$ba['id']] = $baDet;
		}

		return $vals;
	}
}
