<?php
 namespace App\Form\Input; class Autocomplete_Country extends Autocomplete_GeneralAbstract { protected $class = "autocomplete"; public function __construct($label=null, $name=null, $value=null) { parent::__construct($label, $name, $value); $this->setStyle('minimumTextLength', 1); } public function getUrl() { return ($this->url?:\Engine\Mvc\Dispatcher::getInstance()->getAppUrl('Modules/RemoteData/AutocompleteFieldData', '', ['class'=>'Country'])); } public function determineDisplayValue($displayId) :string { return (string)\Entity\Country::select($displayId)->name; } } 