* @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ namespace PrestaShop\Module\PsxMarketingWithGoogle\Repository; use Language; class LanguageRepository { /** * @var int */ private $shopId; public function __construct(int $shopId) { $this->shopId = $shopId; } public function getIsoById(int $id) { return Language::getIsoById($id); } public function getLanguages(): array { $languages = Language::getLanguages(false, $this->shopId); return array_map(function ($language) { return $language['iso_code']; }, $languages); } }