src/ViewModel.php
public function addChild(ViewModelInterface $child, $groupId = null)
    {
        $this->children[] = $child;
        if (! is_null($groupId)) {
            $child->setGroupId($groupId);
        }

        return $this;
    }
public function addChild(ViewModelInterface $child, $groupId = null)
    {
        $this->children[] = $child;
        if (! is_null($groupId)) {
            $child->setGroupId($groupId);
        }

        return $this;
    }
public function addChild ( ViewModelInterface $ child , $ groupId = null ) { $ this -> children [ ] = $ child ; if ( ! is_null ( $ groupId ) ) { $ child -> setGroupId ( $ groupId ) ; } return $ this ; }
Adds the child model.

@param \Es\Mvc\ViewModelInterface $child   The child model
@param string                     $groupId Optional; the group identifier

@return self
Adds the child model .