src/View/Helper/AssetsHelper.php
public function loadPluginAssets()
    {
        $plugin = (string) $this->request->getParam('plugin');
        $prefix = ($this->request->getParam('prefix')) ? $this->request->getParam('prefix') . '/' : null;
        $action = (string) $this->request->getParam('action');

        $controller = (string) $this->request->getParam('controller');
        $widgetName = Str::slug($controller . '-' . $action) . '.js';
        $cssOptions = ['block' => 'css_bottom', 'fullBase' => true, 'force' => Configure::read('debug')];

        $this->Html->css($plugin . '.' . $prefix . 'styles.css', $cssOptions);
        $this->Html->less($plugin . '.' . $prefix . 'styles.less', $cssOptions);
        $this->Html->script([
            $plugin . '.' . $prefix . 'widget/' . $widgetName,
            $plugin . '.' . $prefix . 'script.js'
        ], ['block' => 'script_bottom', 'fullBase' => true]);
    }
public function loadPluginAssets()
    {
        $plugin = (string) $this->request->getParam('plugin');
        $prefix = ($this->request->getParam('prefix')) ? $this->request->getParam('prefix') . '/' : null;
        $action = (string) $this->request->getParam('action');

        $controller = (string) $this->request->getParam('controller');
        $widgetName = Str::slug($controller . '-' . $action) . '.js';
        $cssOptions = ['block' => 'css_bottom', 'fullBase' => true, 'force' => Configure::read('debug')];

        $this->Html->css($plugin . '.' . $prefix . 'styles.css', $cssOptions);
        $this->Html->less($plugin . '.' . $prefix . 'styles.less', $cssOptions);
        $this->Html->script([
            $plugin . '.' . $prefix . 'widget/' . $widgetName,
            $plugin . '.' . $prefix . 'script.js'
        ], ['block' => 'script_bottom', 'fullBase' => true]);
    }
public function loadPluginAssets ( ) { $ plugin = ( string ) $ this -> request -> getParam ( 'plugin' ) ; $ prefix = ( $ this -> request -> getParam ( 'prefix' ) ) ? $ this -> request -> getParam ( 'prefix' ) . '/' : null ; $ action = ( string ) $ this -> request -> getParam ( 'action' ) ; $ controller = ( string ) $ this -> request -> getParam ( 'controller' ) ; $ widgetName = Str :: slug ( $ controller . '-' . $ action ) . '.js' ; $ cssOptions = [ 'block' => 'css_bottom' , 'fullBase' => true , 'force' => Configure :: read ( 'debug' ) ] ; $ this -> Html -> css ( $ plugin . '.' . $ prefix . 'styles.css' , $ cssOptions ) ; $ this -> Html -> less ( $ plugin . '.' . $ prefix . 'styles.less' , $ cssOptions ) ; $ this -> Html -> script ( [ $ plugin . '.' . $ prefix . 'widget/' . $ widgetName , $ plugin . '.' . $ prefix . 'script.js' ] , [ 'block' => 'script_bottom' , 'fullBase' => true ] ) ; }
Autoload plugin assets.

@return  void

@throws  \JBZoo\Less\Exception
Autoload plugin assets .