Exemple #1
0
 /**
  * Setup the required filters necessary for executing a role search request, based on the $input provided.
  *
  * @param $input
  * @return mixed
  */
 public function fromInput(array $input = [])
 {
     $filterCollection = new SearchFilterCollection();
     if (isset($input['keywords'])) {
         $filterCollection->add(KeywordFilter::fromKeywords($input['keywords']));
     }
     $filterCollection->add(OrderFilter::byInput($input));
     $roles = $this->roleRepository->getByFilters($filterCollection);
     return $roles;
 }
Exemple #2
0
 /**
  * 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;
 }
Exemple #3
0
 /**
  * Setup the required filters necessary for executing a role search request, based on the $input provided.
  *
  * @param $input
  * @return mixed
  */
 public function fromInput(array $input = [])
 {
     $filterCollection = new SearchFilterCollection();
     if (isset($input['keywords'])) {
         $filterCollection->add(KeywordFilter::fromKeywords($input['keywords']));
     }
     $orderFilter = OrderFilter::byInput($input);
     $orderFilter->setDefaultField('users.id');
     $filterCollection->add($orderFilter);
     // @TODO: Only apply this if the user cannot manage accounts (aka, not a tectician)
     $filterCollection->add(new UserAccountFilter());
     $roles = $this->userRepository->getByFilters($filterCollection);
     return $roles;
 }