TagModule::toString PHP Method

toString() public method

public toString ( ) : string
return string
    public function toString()
    {
        if (!$this->_TagData) {
            $this->getData();
        }
        if ($this->_TagData->numRows() == 0) {
            return '';
        }
        $String = '';
        ob_start();
        ?>
        <div class="Box Tags">
            <?php 
        echo panelHeading(t($this->ParentID > 0 ? 'Tagged' : 'Popular Tags'));
        ?>
            <ul class="TagCloud">
                <?php 
        foreach ($this->_TagData->result() as $Tag) {
            ?>
                    <?php 
            if ($Tag['Name'] != '') {
                ?>
                        <li><?php 
                echo anchor(htmlspecialchars(TagFullName($Tag)) . ' ' . Wrap(number_format($Tag['CountDiscussions']), 'span', array('class' => 'Count')), TagUrl($Tag, '', '/'), array('class' => 'Tag_' . str_replace(' ', '_', $Tag['Name'])));
                ?>
</li>
                    <?php 
            }
            ?>
                <?php 
        }
        ?>
            </ul>
        </div>
        <?php 
        $String = ob_get_clean();
        return $String;
    }