ForkCMS\Bundle\InstallerBundle\Service\ForkInstaller::createLocaleFiles PHP Method

createLocaleFiles() protected method

Create locale cache files
protected createLocaleFiles ( InstallationData $data )
$data ForkCMS\Bundle\InstallerBundle\Entity\InstallationData
    protected function createLocaleFiles(InstallationData $data)
    {
        // all available languages
        $languages = array_unique(array_merge($data->getLanguages(), $data->getInterfaceLanguages()));
        // loop all the languages
        foreach ($languages as $language) {
            // get applications
            $applications = $this->container->get('database')->getColumn('SELECT DISTINCT application
                 FROM locale
                 WHERE language = ?', array((string) $language));
            // loop applications
            foreach ((array) $applications as $application) {
                // build application locale cache
                BackendLocaleModel::buildCache($language, $application);
            }
        }
    }