public function addChild(Content $child)
    {
        $this->pages[$child->id] = $child;

        // Group by category
        if (!isset($this->categories[$child->category])) {
            $this->categories[$child->category] = [];
        }

        // Add post to category
        $this->categories[$child->category][] = $child;
    }
public function addChild(Content $child)
    {
        $this->pages[$child->id] = $child;

        // Group by category
        if (!isset($this->categories[$child->category])) {
            $this->categories[$child->category] = [];
        }

        // Add post to category
        $this->categories[$child->category][] = $child;
    }
public function addChild ( Content $ child ) { $ this -> pages [ $ child -> id ] = $ child ; // Group by category if ( ! isset ( $ this -> categories [ $ child -> category ] ) ) { $ this -> categories [ $ child -> category ] = [ ] ; } // Add post to category $ this -> categories [ $ child -> category ] [ ] = $ child ; }
Add child to page.

@param Content $child
Add child to page .