findPairs() public method

Fetches all records like $key => $value pairs
public findPairs ( array $criteria, string $value = NULL, array $orderBy = [], string $key = NULL ) : array
$criteria array parameter can be skipped
$value string mandatory
$orderBy array parameter can be skipped
$key string optional
return array
Example #1
0
 public function findPairs($criteria, $value = NULL, $orderBy = array(), $key = NULL)
 {
     return $this->repository->findPairs($criteria, $value, $orderBy, $key);
 }
 /**
  * @return string[]
  */
 public function getAllGenreIdsAndNames() : array
 {
     return $this->genreRepository->findPairs([], 'name');
 }