コード例 #1
0
ファイル: Transformer.php プロジェクト: tectonic/localisation
 /**
  * Gets the translations for the resources and their associated ids.
  *
  * @param array $resources
  * @return Collection
  */
 public function getTranslations(array $resources)
 {
     $resourceCriteria = new ResourceCriteria();
     foreach ($resources as $resource => $ids) {
         $resourceCriteria->addResource($resource);
         foreach ($ids as $id) {
             $resourceCriteria->addId($resource, $id);
         }
     }
     return $this->translationRepository->getByResourceCriteria($resourceCriteria);
 }