Пример #1
0
 /**
  * Disable action
  *
  * @param \Planetflow3\Domain\Model\Item $item
  */
 public function disableAction(\Planetflow3\Domain\Model\Item $item)
 {
     $item->setDisabled(TRUE);
     $this->itemRepository->update($item);
     $this->addFlashMessage('Item disabled.', 'Success', \TYPO3\FLOW3\Error\Message::SEVERITY_OK);
     $this->redirect('index');
 }
 /**
  * Apply filters
  *
  * Should be used after an update of the filter rules to re-apply filters
  * to description and content of an item.
  *
  * @return void
  */
 public function applyFiltersCommand()
 {
     $items = $this->itemRepository->findAll();
     foreach ($items as $item) {
         $item->setDescription($item->getDescription());
         $item->setContent($item->getContent());
         $this->itemRepository->update($item);
     }
 }