Jarves\ContentRender::renderContents PHP 메소드

renderContents() 공개 메소드

Renders all Content elements into html.
public renderContents ( Content[] $contents ) : string
$contents Jarves\Model\Content[]
리턴 string generated html
    public function renderContents($contents)
    {
        $html = '';
        $contents = $this->filterContentsForAccess($contents);
        foreach ($contents as $content) {
            if (is_string($content)) {
                $html .= $content;
                continue;
            }
            if ('stopper' === $content->getType()) {
                if ($html) {
                    break;
                }
                continue;
            }
            $html .= $this->renderContent($content);
        }
        return $html;
    }