Example #1
0
 /**
  * @param Configuration $configuration
  * @return Post[]
  */
 public function findAll(Configuration $configuration = NULL)
 {
     $collection = $this->repository->getAll();
     $sorter = $configuration->getSorter();
     if ($sorter && $sorter->hasRules()) {
         $collection->sort(SorterCallbackFactory::createProperties($sorter->getRules()));
     }
     return $collection->getAll();
 }