Beispiel #1
0
 /**
  * @param int $idLocale
  *
  * @throws \Spryker\Zed\Cms\Business\Exception\LocaleNotFoundException
  *
  * @return \Generated\Shared\Transfer\LocaleTransfer
  */
 protected function getLocaleTransfer($idLocale)
 {
     $localEntity = $this->cmsQueryContainer->queryLocaleById($idLocale)->findOne();
     if ($localEntity === null) {
         throw new LocaleNotFoundException(sprintf('Locale with id %s not found', $idLocale));
     }
     $localTransfer = new LocaleTransfer();
     $localTransfer->fromArray($localEntity->toArray());
     return $localTransfer;
 }