Jarves\ContentRender::renderContents PHP Method

renderContents() public method

Renders all Content elements into html.
public renderContents ( Content[] $contents ) : string
$contents Jarves\Model\Content[]
return 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;
    }