protected function execute(InputInterface $input, OutputInterface $output) { $em = $this->getContainer()->get('doctrine.orm.entity_manager'); $node = new NavigationNode(); $node->setTitle($input->getArgument('title')); $em->persist($node); $em->flush(); }