Pimcore\Model\Document\Tag\Table::frontend PHP Method

frontend() public method

See also: Document\Tag\TagInterface::frontend
public frontend ( ) : string
return string
    public function frontend()
    {
        $html = "";
        if (is_array($this->data) && count($this->data) > 0) {
            $html .= '<table border="0" cellpadding="0" cellspacing="0">';
            foreach ($this->data as $row) {
                $html .= '<tr>';
                foreach ($row as $col) {
                    $html .= '<td>';
                    $html .= $col;
                    $html .= '</td>';
                }
                $html .= '</tr>';
            }
            $html .= '</table>';
        }
        return $html;
    }