/** * Add a child to this container. * * @param BlockInterface $child * @param string $key the collection index name to use in the * child collection. if not set, the child * will simply be appended at the end. * * @return bool Always true */ public function addChild(BlockInterface $child, $key = null) { if ($key != null) { $this->children->set($key, $child); return true; } return $this->children->add($child); }