/** * Setup the required filters necessary for executing a role search request, based on the $input provided. * * @param array $input * @return mixed */ public function fromInput(array $input = []) { $filterCollection = new SearchFilterCollection(); $filterCollection->add(new IncludeFilter('owner', 'domains')); if (isset($input['keywords'])) { $filterCollection->add(KeywordFilter::fromKeywords($input['keywords'])); } $filterCollection->add(OrderFilter::byInput($input)); $accounts = $this->accountRepository->getByFilters($filterCollection); return $accounts; }