Esempio n. 1
0
 /**
  * {@inheritDoc}
  */
 public function load(ObjectManager $manager)
 {
     $blueStage = new Board();
     $blueStage->setName('Blue Stage');
     $blueStage->setImageName('blue.jpeg');
     $this->setReference('board-0', $blueStage);
     $manager->persist($blueStage);
     $redStage = new Board();
     $redStage->setName('Red Stage');
     $redStage->setImageName('red.jpeg');
     $this->setReference('board-1', $redStage);
     $manager->persist($redStage);
     $manager->flush();
 }
Esempio n. 2
0
 /**
  * @param int|Board $board
  */
 public function setBoard($board)
 {
     if (!$board instanceof Board) {
         $board = $this->boardManager->getBoard($board);
     }
     $this->board = $board;
     $this->session->set(self::SESSION_KEY_BOARD, $this->board->getId());
 }