<?php
namespace App\Form\Input; class Autocomplete_Data_MiceProjectType extends \Engine\Form\Input\Autocomplete_Data_GeneralAbstract { protected function getPageResultsBulk() :array { $miceProjectsTypesListObj = new \App\EntityList\MiceProjectTypes(); $miceProjectsTypesListObj->setColumns(['micePrjTypes.name']); $miceProjectsTypesListObj->setFilter('micePrjTypes.name', 'LIKE', "{$this->searchString}%"); $miceProjectsTypesListObj->setOrderBy('micePrjTypes.name', 'ASC'); $miceProjectsTypesListObj->setLimit($this->offset, $this->resultsCountPage); return $this->executeSqlEntityList($miceProjectsTypesListObj); } protected function getPageResultsFormatted(Array $pageResults) { $list = []; foreach($pageResults as $row) { $list[] = $this->getCleanItem($row['id'], $row['name']); } return $list; } }