/** * @param BlockInterface $block * * @return BlockInterface */ protected function generateBlock(BlockInterface $block) { $block->setPrivate($this->container->get('open_orchestra_display.display_block_manager')->isPublic($block)); $block->setParameter($this->blockParameters[$block->getComponent()]); $this->manager->persist($block); $this->manager->flush(); return $block; }
/** * @param ObjectManager $manager * @param BlockInterface $block */ protected function generateBlock(ObjectManager $manager, BlockInterface $block) { $block->setPrivate(!$this->container->get('open_orchestra_display.display_block_manager')->isPublic($block)); $block->setParameter($this->blockParameters[$block->getComponent()]); $manager->persist($block); $manager->flush(); $this->setReference($block->getLabel(), $block); }