/** * Constructor hook method. * * @param array $config */ public function initialize(array $config) { parent::initialize($config); $coreLess = $this->_path->get('UnionCore:assets/less'); $this->config('root_path', APP_ROOT); $this->config('import_paths', [$coreLess => $coreLess]); $this->config('debug', Configure::read('debug')); $this->config('cache_path', ASSETS_CACHE . '/styles'); }
/** * Before render callback. * * @param Event $event * @param string $viewFile */ public function beforeRender(Event $event, $viewFile) { parent::beforeRender($event, $viewFile); $this->_autoAssets(); }
/** * Constructor hook method. * * @param array $config */ public function initialize(array $config) { parent::initialize($config); $this->_setProperties(); }