Exemple #1
0
 /**
  * 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');
 }
Exemple #2
0
 /**
  * Before render callback.
  *
  * @param Event $event
  * @param string $viewFile
  */
 public function beforeRender(Event $event, $viewFile)
 {
     parent::beforeRender($event, $viewFile);
     $this->_autoAssets();
 }
Exemple #3
0
 /**
  * Constructor hook method.
  *
  * @param array $config
  */
 public function initialize(array $config)
 {
     parent::initialize($config);
     $this->_setProperties();
 }