Esempio n. 1
0
 public function toExcelAction()
 {
     $this->filename = 'CollectionFilters.xlsx';
     $tables = array('NewsletterFilter_CollectionsSet' => array('NFCS_ID', 'NFCS_Name'));
     $this->fields = array('NFCS_Name' => array('width' => '300px', 'label' => ''));
     $this->filters = array();
     $filterCollectionSet = new NewsletterFilterCollectionsSet();
     $this->select = $filterCollectionSet->select();
     parent::toExcelAction();
 }
Esempio n. 2
0
 public function toExcelAction()
 {
     $this->filename = 'Events.xlsx';
     $tables = array('EventsData' => array('ED_ID', 'ED_CategoryID'), 'EventsIndex' => array('EI_EventsDataID', 'EI_LanguageID', 'EI_Title', 'EI_Status'), 'Status' => array('S_Code'));
     $this->fields = array('EI_Title' => array('width' => '', 'label' => ''), 'S_Code' => array('width' => '', 'label' => ''));
     $this->filters = array();
     $this->view->params = $this->_getAllParams();
     $events = new EventsData();
     $this->select = $this->_db->select()->from('EventsData')->join('EventsIndex', 'EventsData.ED_ID = EventsIndex.EI_EventsDataID')->join('Status', 'EventsIndex.EI_Status = Status.S_ID')->where('EI_LanguageID = ?', $this->_defaultEditLanguage)->order('EI_Title');
     $blockID = $this->_getParam('blockID');
     $pageID = $this->_getParam('pageID');
     if ($blockID && $pageID) {
         $blockParameters = Cible_FunctionsBlocks::getBlockParameters($blockID);
         $categoryID = $blockParameters[0]['P_Value'];
         $this->select->where('ED_CategoryID = ?', $categoryID);
     }
     parent::toExcelAction();
 }
Esempio n. 3
0
 /**
  * Initiate some specific variables on loading
  *
  * @return void
  */
 public function init()
 {
     parent::init();
     //Add specific style sheet
     $this->view->headLink()->prependStylesheet($this->view->locateFile('moduleForm.css'));
 }
Esempio n. 4
0
 /**
  * Export data according to given parameters.
  *
  * @return void
  */
 public function toExcelAction()
 {
     $this->type = 'CSV';
     $this->filename = $this->_actionKey . '.csv';
     $params = array();
     $actionName = $this->_actionKey . 'Action';
     $params = $this->{$actionName}(true);
     $oDataName = $this->_objectList[$this->_actionKey];
     $lines = new $oDataName();
     $foreignKey = $lines->getForeignKey();
     $params['foreignKey'] = $foreignKey;
     $this->tables = array($lines->getDataTableName() => $lines->getDataColumns());
     $this->view->params = $this->_getAllParams();
     $columns = array_keys($params['columns']);
     $this->fields = array_combine($columns, $columns);
     $this->filters = array();
     $pageID = $this->_getParam('pageID');
     $langId = $this->_defaultEditLanguage;
     $select = $lines->getAll($langId, false);
     $select = $this->_addJoinQuery($select, $params);
     $this->select = $select;
     parent::toExcelAction();
 }
Esempio n. 5
0
 public function toExcelAction()
 {
     $this->filename = 'Newsletter.xlsx';
     $searchfor = $this->_request->getParam('searchfor');
     $profile = new NewsletterProfile();
     $this->select = $profile->getSelectStatement();
     $this->tables = array('GenericProfiles' => array('GP_lastName', 'GP_firstName', 'GP_Email'));
     $this->fields = array('lastName' => array('width' => '', 'label' => ''), 'firstName' => array('width' => '', 'label' => ''), 'email' => array('width' => '', 'label' => ''));
     $this->filters = array();
     parent::toExcelAction();
 }
Esempio n. 6
0
 public function allLecteurRssToExcelAction()
 {
     $this->filename = 'LecteurRss.xlsx';
     $tables = array('LecteurRssData' => array('ND_ID', 'ND_CategoryID', 'ND_Date', 'ND_ReleaseDate'), 'LecteurRssIndex' => array('NI_LecteurRssDataID', 'NI_LanguageID', 'NI_Title', 'NI_Status'), 'Status' => array('S_Code'), 'CategoriesIndex' => array('CI_Title'));
     $this->fields = array('NI_Title' => array('width' => '', 'label' => ''), 'ND_ReleaseDate' => array('width' => '', 'label' => ''), 'ND_Date' => array('width' => '', 'label' => ''), 'CI_Title' => array('width' => '', 'label' => ''), 'S_Code' => array('width' => '', 'label' => ''));
     $this->filters = array();
     $this->view->params = $this->_getAllParams();
     $LecteurRss = new LecteurRssData();
     $this->select = $this->_db->select()->from('LecteurRssData')->join('LecteurRssIndex', 'LecteurRssData.ND_ID = LecteurRssIndex.NI_LecteurRssDataID')->join('Status', 'LecteurRssIndex.NI_Status = Status.S_ID')->join('CategoriesIndex', 'LecteurRssData.ND_CategoryID = CategoriesIndex.CI_CategoryID')->where('NI_LanguageID = ?', Zend_Registry::get("languageID"))->order('NI_Title');
     $blockID = $this->_getParam('blockID');
     $pageID = $this->_getParam('pageID');
     if ($blockID && $pageID) {
         $blockParameters = Cible_FunctionsBlocks::getBlockParameters($blockID);
         $categoryID = $blockParameters[0]['P_Value'];
         $this->select->where('ND_CategoryID = ?', $categoryID);
     }
     parent::toExcelAction();
 }