/** * Shows a message that the list is empty. * * @return string A message saying that the list is empty. */ public function emptyListAction() { // TODO this action is simply stupid... why the hell do we have that?!? $list = $this->listFactory->createList($this->dataBackend, $this->configurationBuilder); $this->view->assign('listData', $list->getListData()); $this->view->assign('filterCollection', $this->dataBackend->getFilterboxCollection()); }
/** * Renders show action for column selector controller * * @return string The rendered index action */ public function showAction() { $list = $this->listFactory->createList($this->dataBackend, $this->configurationBuilder); $renderedCaptions = $this->rendererChain->renderCaptions($list->getListHeader()); $columnSelector = $this->columnSelectorFactory->getInstance($this->configurationBuilder); $this->view->assign('columnSelector', $columnSelector); $this->view->assign('listHeader', $list->getListHeader()); $this->view->assign('listCaptions', $renderedCaptions); }
/** * 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(); }
/** * List action rendering list * * @return string Rendered list for given list identifier */ public function listAction() { $list = $this->listFactory->createList($this->dataBackend, $this->configurationBuilder); if ($list->count() == 0) { $this->addFlashMessage(\TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('general.emptyList', 'PtExtlist'), '', \TYPO3\CMS\Core\Messaging\FlashMessage::INFO); } $this->view->assign('config', $this->configurationBuilder); $this->view->assign('listHeader', $list->getListHeader()); $this->view->assign('listCaptions', $list->getRenderedListHeader()); $this->view->assign('listData', $list->getRenderedListData()); $this->view->assign('aggregateRows', $list->getRenderedAggregateListData()); $this->view->assign('exportIdentifiers', $this->exportIdentifiers); if ($this->filterbox) { $this->view->assign('filterBoxCollection', $this->filterboxCollection); $this->view->assign('filterbox', $this->filterbox); } if ($this->pagerIdentifier) { $this->view->assign('pagerCollection', $this->pagerCollection); $this->view->assign('pager', $this->pagerCollection->getPagerByIdentifier($this->pagerIdentifier)); } }
/** * Returns list object of this list context * * @param boolean $buildNew * @return Tx_PtExtlist_Domain_Model_List_List */ public function getList($buildNew = false) { if ($this->list == null || $buildNew) { $this->list = $this->listFactory->createList($this->dataBackend, $this->dataBackend->getConfigurationBuilder(), $buildNew); } return $this->list; }