public function getModel()
{
if (!$this->model) {
$this->model = $this->add($this->model_name);
}
/** @type Model $this->model */
if ($this->display_field) {
$this->model->title_field = $this->display_field;
}
if ($this->table_alias) {
$this->model->table_alias = $this->table_alias;
}
return $this->model;
}