/**
  * Install fixtures for ToDoList
  *
  * @return void
  */
 public function fixturesCommand()
 {
     $activeToDoList = new ToDoList();
     for ($i = 1; $i <= 3; $i++) {
         $item = new Item();
         $item->setLabel('Item #' . $i);
         $activeToDoList->addItem($item);
     }
     $this->toDoListRepository->add($activeToDoList);
     $this->outputLine('Successfully created fixtures');
 }
Esempio n. 2
0
 /**
  * @return void
  */
 public function indexAction()
 {
     $toDoList = $this->toDoListRepository->findActive();
     $this->view->assign('list', $toDoList);
 }