public function getPosts(Content $content)
    {
        if (isset($this->site->categories[$content->id])) {
            return $this->site->categories[$content->id];
        }
        else {
            if (isset($content->category) && isset($this->site->categories[$content->category])) {
                return $this->site->categories[$content->category];
            }
        }

        return [];
    }
public function getPosts(Content $content)
    {
        if (isset($this->site->categories[$content->id])) {
            return $this->site->categories[$content->id];
        }
        else {
            if (isset($content->category) && isset($this->site->categories[$content->category])) {
                return $this->site->categories[$content->category];
            }
        }

        return [];
    }
public function getPosts ( Content $ content ) { if ( isset ( $ this -> site -> categories [ $ content -> id ] ) ) { return $ this -> site -> categories [ $ content -> id ] ; } else { if ( isset ( $ content -> category ) && isset ( $ this -> site -> categories [ $ content -> category ] ) ) { return $ this -> site -> categories [ $ content -> category ] ; } } return [ ] ; }
Get posts for given content.

@param  Content $content
@return array
Get posts for given content .