Exemple #1
0
 /**
  * Getter for album list extlist context
  *
  */
 public function getAlbumListContext()
 {
     if ($this->albumListContext === NULL) {
         $this->albumListContext = Tx_PtExtlist_ExtlistContext_ExtlistContextFactory::getContextByCustomConfiguration($this->configurationBuilder->buildExtlistConfiguration()->getExtlistSettingsByListId(self::ALBUM_LIST_ID), self::ALBUM_LIST_ID . $this->identifier, FALSE);
     }
     return $this->albumListContext;
 }
 /**
  * Returns download for given parameters
  *
  * @return string
  * @throws Exception
  */
 public function downloadAction()
 {
     if ($this->listIdentifier == $this->exportListIdentifier || !$this->exportListIdentifier) {
         $list = $this->listFactory->createList($this->dataBackend, $this->configurationBuilder);
     } else {
         $exportListConfiguration = $this->settings['listConfig'][$this->exportListIdentifier];
         if (!is_array($exportListConfiguration)) {
             throw new Exception('No export list configuration found for listIdentifier ' . $this->exportListIdentifier, 1317116470);
         }
         $extListContext = Tx_PtExtlist_ExtlistContext_ExtlistContextFactory::getContextByCustomConfiguration($exportListConfiguration, $this->listIdentifier, false);
         $list = $extListContext->getList(true);
     }
     $this->view->setExportConfiguration($this->configurationBuilder->buildExportConfiguration());
     $this->view->initConfiguration();
     $this->view->assign('listHeader', $list->getListHeader());
     $this->view->assign('listCaptions', $list->getRenderedListHeader());
     $this->view->assign('listData', $list->getRenderedListData());
     $this->view->assign('aggregateRows', $list->getRenderedAggregateListData());
     return $this->view->render();
 }
 /**
  * @param string $exportIdentifier
  * @return string
  * @throws Exception
  */
 public function downloadAction($exportIdentifier)
 {
     $exportSettingsPath = $this->extlistTypoScriptSettingsPath . '.export.exportConfigs.' . $exportIdentifier;
     $exportSettings = \PunktDe\PtExtbase\Utility\NamespaceUtility::getArrayContentByArrayAndNamespace($this->settings, $exportSettingsPath);
     if (!is_array($exportSettings) || empty($exportSettings)) {
         throw new Exception('No export settings found within the path ' . $exportSettingsPath, 1331644291);
     }
     $exportConfig = new Tx_PtExtlist_Domain_Configuration_Export_ExportConfig($this->configurationBuilder, $exportSettings);
     if (array_key_exists('exportListSettingsPath', $exportSettings)) {
         $exportListSettings = \PunktDe\PtExtbase\Utility\NamespaceUtility::getArrayContentByArrayAndNamespace($this->settings, $exportSettings['exportListSettingsPath']);
     } else {
         $exportListSettings = $this->configurationBuilder->getSettings();
     }
     $extListContext = Tx_PtExtlist_ExtlistContext_ExtlistContextFactory::getContextByCustomConfiguration($exportListSettings, $this->listIdentifier, false);
     $list = $extListContext->getList(true);
     $view = $this->objectManager->get($exportConfig->getViewClassName());
     $view->setConfigurationBuilder($extListContext->getConfigurationBuilder());
     $view->setExportConfiguration($exportConfig);
     $view->assign('listHeader', $list->getListHeader());
     $view->assign('listCaptions', $list->getRenderedListHeader());
     $view->assign('listData', $list->getRenderedListData());
     $view->assign('aggregateRows', $list->getRenderedAggregateListData());
     return $view->render();
 }