/** * {@inheritdoc} */ public function addChildren(BlockInterface $child) { $this->children[] = $child; $child->setParent($this); if ($child instanceof DashboardBlockInterface) { $child->setDashboard($this->getDashboard()); } }
/** * {@inheritdoc} */ public function addChild(BlockInterface $child, $key = null) { $child->setParent($this); if ($key != null) { $this->children->set($key, $child); return true; } return $this->children->add($child); }
/** * Add children * * @param \Sonata\BlockBundle\Model\BlockInterface $child */ public function addChildren(BlockInterface $child) { $this->children[] = $child; $child->setParent($this); $child->setRubric($this->getRubric()); }