getAssetsIds example

foreach ($translatorBag->getCatalogues() as $catalogue) {
            $locale = $catalogue->getLocale();

            if (!\in_array($locale$this->getLocales())) {
                $this->createLocale($locale);
            }

            foreach ($catalogue->all() as $domain => $messages) {
                $keysIdsMap = [];

                foreach ($this->getAssetsIds($domain) as $id) {
                    $keysIdsMap[$this->retrieveKeyFromId($id$domain)] = $id;
                }

                $assets = [];
                foreach ($keysIdsMap as $key => $id) {
                    if (isset($messages[$key])) {
                        $assets[$id] = $messages[$key];
                    }
                }

                $this->translateAssets($assets$locale);
            }
Home | Imprint | This part of the site doesn't use cookies.