protected function _loadAssets()
    {
        if (Configure::read('CrudView.useAssetCompress')) {
            $this->AssetCompress->css('CrudView.crudview', ['block' => true]);
            $this->AssetCompress->script('CrudView.crudview_head', ['block' => 'headjs']);
            $this->AssetCompress->script('CrudView.crudview', ['block' => true]);

            return;
        }

        $config = Configure::read('CrudView');
        if (!$config) {
            return;
        }

        if (!empty($config['css'])) {
            $this->Html->css($config['css'], ['block' => true]);
        }

        if (!empty($config['js'])) {
            foreach ($config['js'] as $block => $scripts) {
                $this->Html->script($scripts, ['block' => $block]);
            }
        }
    }
protected function _loadAssets()
    {
        if (Configure::read('CrudView.useAssetCompress')) {
            $this->AssetCompress->css('CrudView.crudview', ['block' => true]);
            $this->AssetCompress->script('CrudView.crudview_head', ['block' => 'headjs']);
            $this->AssetCompress->script('CrudView.crudview', ['block' => true]);

            return;
        }

        $config = Configure::read('CrudView');
        if (!$config) {
            return;
        }

        if (!empty($config['css'])) {
            $this->Html->css($config['css'], ['block' => true]);
        }

        if (!empty($config['js'])) {
            foreach ($config['js'] as $block => $scripts) {
                $this->Html->script($scripts, ['block' => $block]);
            }
        }
    }
protected function _loadAssets ( ) { if ( Configure :: read ( 'CrudView.useAssetCompress' ) ) { $ this -> AssetCompress -> css ( 'CrudView.crudview' , [ 'block' => true ] ) ; $ this -> AssetCompress -> script ( 'CrudView.crudview_head' , [ 'block' => 'headjs' ] ) ; $ this -> AssetCompress -> script ( 'CrudView.crudview' , [ 'block' => true ] ) ; return ; } $ config = Configure :: read ( 'CrudView' ) ; if ( ! $ config ) { return ; } if ( ! empty ( $ config [ 'css' ] ) ) { $ this -> Html -> css ( $ config [ 'css' ] , [ 'block' => true ] ) ; } if ( ! empty ( $ config [ 'js' ] ) ) { foreach ( $ config [ 'js' ] as $ block => $ scripts ) { $ this -> Html -> script ( $ scripts , [ 'block' => $ block ] ) ; } } }
Read from config which css and js files to load, and add them to the output.
If `AssetCompress` plugin is loaded, use the `asset_compress.ini` configuration
that is part of this plugin.

@return void
Read from config which css and js files to load and add them to the output . If AssetCompress plugin is loaded use the asset_compress . ini configuration that is part of this plugin .