/** * @param \Lelesys\Plugin\News\Domain\Model\Folder $folder * @return void */ public function deleteAction(\Lelesys\Plugin\News\Domain\Model\Folder $folder) { $this->folderService->delete($folder); $packageKey = $this->settings['flashMessage']['packageKey']; $header = 'Deleted the folder.'; $message = $this->translator->translateById('lelesys.plugin.news.delete.folder', array(), NULL, NULL, 'Main', $packageKey); $this->addFlashMessage($message, $header, \TYPO3\Flow\Error\Message::SEVERITY_OK); $this->redirect('index'); }
/** * Shows a list of comments * * @param \Lelesys\Plugin\News\Domain\Model\News $news The News * @param array $filterFlag The active flag * @param string $selected The select value for comment filter * @return void */ public function indexAction(\Lelesys\Plugin\News\Domain\Model\News $news = NULL, $filterFlag = NULL, $selected = NULL) { $this->view->assign('selectVal', $selected); if ($news !== NULL) { $this->view->assign('comments', $this->commentService->getCommentsByNews($news)); } else { $this->view->assign('comments', $this->commentService->listAllCommentsAdmin($filterFlag)); } $this->view->assign('folders', $this->folderService->listAll()); }
/** * Shows a form for editing an existing news object * * @param \Lelesys\Plugin\News\Domain\Model\News $news The news to edit * @return void */ public function editAction(\Lelesys\Plugin\News\Domain\Model\News $news) { $this->view->assign('folders', $this->folderService->listAll()); $this->view->assign('relatedNews', $this->newsService->listRelatedNews($news)); $this->view->assign('newsCategories', $this->categoryService->getEnabledLatestCategories()); $this->view->assign('newsTags', $news->getTags()); $this->view->assign('news', $news); $this->view->assign('media', $news->getAssets()); $this->view->assign('files', $news->getFiles()); $this->view->assign('relatedLinks', $news->getRelatedLinks()); $this->view->assign('tags', $this->tagService->listAll()); }
/** * Returns the processed Configuration * * @param \TYPO3\TYPO3CR\Domain\Model\NodeType $nodeType (uninitialized) The node type to process * @param array $configuration input configuration * @param array $options The processor options * @return void */ public function process(NodeType $nodeType, array &$configuration, array $options) { $folders = $this->folderService->listAll(); if ($folders->count()) { foreach ($folders as $folder) { /** @var $folder \Lelesys\Plugin\News\Domain\Model\Folder */ $configuration['properties']['folderId']['ui']['inspector']['editorOptions']['values'][$folder->getUuid()] = array('label' => $folder->getTitle()); } } $categories = $this->categoryService->getEnabledLatestCategories(); if ($categories->count()) { foreach ($categories as $category) { /** @var $category \Lelesys\Plugin\News\Domain\Model\Category */ $configuration['properties']['categoryId']['ui']['inspector']['editorOptions']['values'][$category->getUuid()] = array('label' => $category->getTitle()); } } $parentCategories = $this->categoryService->getEnabledParentCategories(); if ($parentCategories->count()) { foreach ($parentCategories as $category) { /** @var $category \Lelesys\Plugin\News\Domain\Model\Category */ $configuration['properties']['parentCategoryId']['ui']['inspector']['editorOptions']['values'][$category->getUuid()] = array('label' => $category->getTitle()); } } }
/** * Shows a form for editing an existing category object * * @param \Lelesys\Plugin\News\Domain\Model\Category $category The category to edit * @return void */ public function editAction(\Lelesys\Plugin\News\Domain\Model\Category $category) { $this->view->assign('folders', $this->folderService->listAll()); $this->view->assign('newsParentCategory', $this->categoryService->listParentCategory($category)); $this->view->assign('category', $category); }