src/Phlexible/Bundle/GuiBundle/Asset/TranslationsBuilder.php
public function build($locale, $domain = 'gui')
    {
        $cache = new ConfigCache($this->cacheDir.'/translations-'.$locale.'.js', $this->debug);

        if (!$cache->isFresh()) {
            $content = $this->buildContent($locale, $domain);

            $cache->write($content->getContent(), $content->getResources());

            if (!$this->debug) {
                $this->compressor->compressFile((string) $cache);
            }
        }

        return new Asset((string) $cache);
    }
public function build($locale, $domain = 'gui')
    {
        $cache = new ConfigCache($this->cacheDir.'/translations-'.$locale.'.js', $this->debug);

        if (!$cache->isFresh()) {
            $content = $this->buildContent($locale, $domain);

            $cache->write($content->getContent(), $content->getResources());

            if (!$this->debug) {
                $this->compressor->compressFile((string) $cache);
            }
        }

        return new Asset((string) $cache);
    }
public function build ( $ locale , $ domain = 'gui' ) { $ cache = new ConfigCache ( $ this -> cacheDir . '/translations-' . $ locale . '.js' , $ this -> debug ) ; if ( ! $ cache -> isFresh ( ) ) { $ content = $ this -> buildContent ( $ locale , $ domain ) ; $ cache -> write ( $ content -> getContent ( ) , $ content -> getResources ( ) ) ; if ( ! $ this -> debug ) { $ this -> compressor -> compressFile ( ( string ) $ cache ) ; } } return new Asset ( ( string ) $ cache ) ; }
Get all Translations for the given section.

@param string $locale
@param string $domain

@return Asset
Get all Translations for the given section .