Esempio n. 1
0
 /**
  * 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);
 }
 /**
  * Deletes a number of translation objects at once.
  *
  * @param array $translations
  */
 public function deleteAll(array $translations)
 {
     foreach ($translations as $translation) {
         $this->translations->delete($translation);
     }
 }