private function renderErrors(Base $base) : string
    {
        if (! $base->hasErrors()) {
            return '';
        }

        $html = '';

        foreach ($base->getErrors() as $error) {
            $li = new Tag('li');
            $li->setTextContent($error);
            $html .= $li->render();
        }

        $ul = new Tag('ul');
        $ul->setHtmlContent($html);

        return $ul->render();
    }
private function renderErrors(Base $base) : string
    {
        if (! $base->hasErrors()) {
            return '';
        }

        $html = '';

        foreach ($base->getErrors() as $error) {
            $li = new Tag('li');
            $li->setTextContent($error);
            $html .= $li->render();
        }

        $ul = new Tag('ul');
        $ul->setHtmlContent($html);

        return $ul->render();
    }
private function renderErrors ( Base $ base ) : string { if ( ! $ base -> hasErrors ( ) ) { return '' ; } $ html = '' ; foreach ( $ base -> getErrors ( ) as $ error ) { $ li = new Tag ( 'li' ) ; $ li -> setTextContent ( $ error ) ; $ html .= $ li -> render ( ) ; } $ ul = new Tag ( 'ul' ) ; $ ul -> setHtmlContent ( $ html ) ; return $ ul -> render ( ) ; }
Renders the errors of a Form or an Element as an unordered list.

@param \Brick\Form\Base $base

@return string
Renders the errors of a Form or an Element as an unordered list .