src/Sulu/Bundle/MediaBundle/Api/Collection.php
public function addChild(self $child)
    {
        if (!is_array($this->children)) {
            $this->children = [];
        }

        $this->children[] = $child;
    }
public function addChild(self $child)
    {
        if (!is_array($this->children)) {
            $this->children = [];
        }

        $this->children[] = $child;
    }
public function addChild ( self $ child ) { if ( ! is_array ( $ this -> children ) ) { $ this -> children = [ ] ; } $ this -> children [ ] = $ child ; }
Add child to resource.

@param Collection $child
Add child to resource .