示例#1
0
 /**
  * Load elements css/js assets
  * @return $this
  */
 public function loadConfigAssets()
 {
     parent::loadConfigAssets();
     $this->app->jbassets->js('assets:js/finder.js');
     $this->app->jbassets->js('cart-elements:email/attach/assets/js/attach.js');
     $this->app->jbassets->css('assets:css/ui.css');
     return $this;
 }
示例#2
0
 /**
  * Render elements data
  * @param  AppData|array $params
  * @return null|string
  */
 public function render($params = array())
 {
     $mode = $this->config->get('download_mode', 'link');
     if ($mode == 'attach') {
         $files = $this->_getFiles();
         foreach ($files as $file) {
             $ext = JFile::getExt($file['full']);
             $this->_mailer->addAttachment($file['full'], $file['name'] . '.' . $ext);
         }
         return null;
         // no HTML
     }
     return parent::render($params);
 }