Core/Framework/Core.php
private function initAssetManager()
    {
        $this->di->mapService('core.asset', '\Core\Asset\AssetManager');

        $this->assetmanager = $this->di->get('core.asset');

        // Create default js asset handler
        $ah = $this->assetmanager->createAssetHandler('js', 'js');
        $ah->setBasedir($this->basedir);
        $ah->setBaseurl(BASEURL);

        $this->di->mapValue('core.asset.js', $ah);

        // Add minify processor on config demand
        if ($this->config->get('Core', 'asset.general.minify_js')) {
            $ah->addProcessor(new \Core\Asset\Processor\JSMinProcessor());
        }

        // Create default css asset handler
        $ah = $this->assetmanager->createAssetHandler('css', 'css');
        $ah->setBasedir($this->basedir);
        $ah->setBaseurl(BASEURL);

        $this->di->mapValue('core.asset.css', $ah);

        // Add minify processor on config demand
        if ($this->config->get('Core', 'asset.general.minify_css')) {
            $ah->addProcessor(new \Core\Asset\Processor\CssMinProcessor());
            $ah->addProcessor(new \Core\Asset\Processor\ReplaceProcessor('../fonts/', '../Themes/Core/fonts/'));
            $ah->addProcessor(new \Core\Asset\Processor\ReplaceProcessor('../img/', '../Themes/Core/img/'));
        }
    }
private function initAssetManager()
    {
        $this->di->mapService('core.asset', '\Core\Asset\AssetManager');

        $this->assetmanager = $this->di->get('core.asset');

        // Create default js asset handler
        $ah = $this->assetmanager->createAssetHandler('js', 'js');
        $ah->setBasedir($this->basedir);
        $ah->setBaseurl(BASEURL);

        $this->di->mapValue('core.asset.js', $ah);

        // Add minify processor on config demand
        if ($this->config->get('Core', 'asset.general.minify_js')) {
            $ah->addProcessor(new \Core\Asset\Processor\JSMinProcessor());
        }

        // Create default css asset handler
        $ah = $this->assetmanager->createAssetHandler('css', 'css');
        $ah->setBasedir($this->basedir);
        $ah->setBaseurl(BASEURL);

        $this->di->mapValue('core.asset.css', $ah);

        // Add minify processor on config demand
        if ($this->config->get('Core', 'asset.general.minify_css')) {
            $ah->addProcessor(new \Core\Asset\Processor\CssMinProcessor());
            $ah->addProcessor(new \Core\Asset\Processor\ReplaceProcessor('../fonts/', '../Themes/Core/fonts/'));
            $ah->addProcessor(new \Core\Asset\Processor\ReplaceProcessor('../img/', '../Themes/Core/img/'));
        }
    }
private function initAssetManager ( ) { $ this -> di -> mapService ( 'core.asset' , '\Core\Asset\AssetManager' ) ; $ this -> assetmanager = $ this -> di -> get ( 'core.asset' ) ; // Create default js asset handler $ ah = $ this -> assetmanager -> createAssetHandler ( 'js' , 'js' ) ; $ ah -> setBasedir ( $ this -> basedir ) ; $ ah -> setBaseurl ( BASEURL ) ; $ this -> di -> mapValue ( 'core.asset.js' , $ ah ) ; // Add minify processor on config demand if ( $ this -> config -> get ( 'Core' , 'asset.general.minify_js' ) ) { $ ah -> addProcessor ( new \ Core \ Asset \ Processor \ JSMinProcessor ( ) ) ; } // Create default css asset handler $ ah = $ this -> assetmanager -> createAssetHandler ( 'css' , 'css' ) ; $ ah -> setBasedir ( $ this -> basedir ) ; $ ah -> setBaseurl ( BASEURL ) ; $ this -> di -> mapValue ( 'core.asset.css' , $ ah ) ; // Add minify processor on config demand if ( $ this -> config -> get ( 'Core' , 'asset.general.minify_css' ) ) { $ ah -> addProcessor ( new \ Core \ Asset \ Processor \ CssMinProcessor ( ) ) ; $ ah -> addProcessor ( new \ Core \ Asset \ Processor \ ReplaceProcessor ( '../fonts/' , '../Themes/Core/fonts/' ) ) ; $ ah -> addProcessor ( new \ Core \ Asset \ Processor \ ReplaceProcessor ( '../img/' , '../Themes/Core/img/' ) ) ; } }
Initiates the AssetManager
Initiates the AssetManager