<?php

namespace App\Form\Input;

/**
 * Office autocomplete field
 *
 */
class Autocomplete_ClientActivityCategory extends Autocomplete_GeneralAbstract
{

	protected $class = "autocomplete";

	/**
	 * (non-PHPdoc)
	 * @see \Engine\Form\Input\Autocomplete::getUrl()
	 */
	public function getUrl()
	{
		return ($this->url?:\Engine\Mvc\Dispatcher::getInstance()->getAppUrl('Modules/RemoteData/AutocompleteFieldData', '', ['class'=>'ClientActivityCategory']));
	}

	/**
	 * (non-PHPdoc)
	 * @see \Engine\Form\Input\Autocomplete::determineDisplayValue()
	 */
	public function determineDisplayValue($displayId)  :string
	{
		return (string)\Entity\ActivityDomainCategory::select($displayId)->name;
	}

}
