public function addCardToMindMap(\Model\MindMap $map, \Model\Card $card, $x = 0, $y = 0, $z = 0, $width = 160, $height = 100, $isCollapsed = true) { $mc = new \Model\MindMapCard(); $mc->SetCollapsed($isCollapsed); $mc->setCard($card); $mc->setX($x); $mc->setY($y); $mc->setZ($z); $mc->setWidth($width); $mc->setHeight($height); $mc->setParent($map); $this->em->persist($mc); $this->em->flush(); return $mc; }