/**
  * {@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);
 }
Esempio n. 3
0
 /**
  * Add children
  *
  * @param \Sonata\BlockBundle\Model\BlockInterface $child
  */
 public function addChildren(BlockInterface $child)
 {
     $this->children[] = $child;
     $child->setParent($this);
     $child->setRubric($this->getRubric());
 }