<?php
namespace App\Form\Input;

class Cloned_AutocompleteCity extends \Engine\Form\Input\Cloned_Autocomplete
{

	protected $class = "clonedAutocomplete";

	/**
	 * The constructor for the cloned autocomplete supplier.
	 * @param String $label
	 * @param String $name
	 * @param Array $value
	 */
	public function __construct($label=null, $name=null, $value=null)
	{
		parent::__construct($label, $name, $value);
		$this->url = \Engine\Mvc\Dispatcher::getInstance()->getAppUrl('Modules/RemoteData/AutocompleteFieldData', '', ['class'=>'City']);
	}

	public function determineDisplayValue($displayId) :string
	{
		return (string)\Entity\City::select($displayId)->name;
	}

}