/**
  * @param integer $limit
  * @return void
  */
 public function listCommand()
 {
     try {
         $presets = $this->presetRepository->findAll();
         foreach ($presets as $key => $preset) {
             $this->outputLine($key);
         }
     } catch (\Lightwerk\SurfCaptain\Domain\Repository\Preset\Exception $e) {
         $this->outputLine('ERROR: ' . $e->getMessage() . ' - ' . $e->getCode());
     }
 }
Пример #2
0
 /**
  * @param boolean $globals
  * @return void
  */
 public function listAction($globals = NULL)
 {
     try {
         if (empty($globals)) {
             $presets = $this->presetRepository->findAll();
         } else {
             $presets = $this->presetRepository->findGlobals();
         }
         $this->view->assign('presets', $presets);
     } catch (\Lightwerk\SurfCaptain\Service\Exception $e) {
         $this->handleException($e);
     } catch (\TYPO3\Flow\Http\Exception $e) {
         $this->handleException($e);
     }
 }