API16

JToolBar/render: Difference between revisions

From Joomla! Documentation

Doxiki (talk | contribs)
New page: ===Description=== Render. <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki> </span> {{Descripti...
 
m clean up
Line 2: Line 2:
Render.
Render.


<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[Description:JToolBar/render|Edit Descripton]]<nowiki>]</nowiki>
</span>


{{Description:JToolBar/render}}
 
{{subst:Description:JToolBar/render}}


===Syntax===
===Syntax===
Line 44: Line 42:
</source>
</source>


<span class="editsection" style="font-size:76%;">
 
<nowiki>[</nowiki>[[SeeAlso:JToolBar/render|Edit See Also]]<nowiki>]</nowiki>
{{subst:SeeAlso:JToolBar/render}}
</span>
{{SeeAlso:JToolBar/render}}


===Examples===
===Examples===

Revision as of 14:32, 24 March 2017

Description

Render.


{{subst:Description:JToolBar/render}}

Syntax

render()


Returns

string HTML

Defined in

libraries/joomla/html/toolbar.php

Importing

jimport( 'joomla.html.toolbar' );

Source Body

public function render()
{
        $html = array ();

        // Start toolbar div.
        $html[] = '<div class="toolbar-list" id="'.$this->_name.'">';
        $html[] = '<ul>';

        // Render each button in the toolbar.
        foreach ($this->_bar as $button) {
                $html[] = $this->renderButton($button);
        }

        // End toolbar div.
        $html[] = '</ul>';
        $html[] = '<div class="clr"></div>';
        $html[] = '</div>';

        return implode("\n", $html);
}


{{subst:SeeAlso:JToolBar/render}}

Examples

<CodeExamplesForm />