API16

JButtonSeparator/render: Difference between revisions

From Joomla! Documentation

Doxiki (talk | contribs)
No edit summary
m preparing for archive only
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<! removed transcluded page call, red link never existed >
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[Description:JButtonSeparator/render|Edit Descripton]]<nowiki>]</nowiki>
</span>
 
{{Description:JButtonSeparator/render}}


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


<span class="editsection" style="font-size:76%;">
 
<nowiki>[</nowiki>[[SeeAlso:JButtonSeparator/render|Edit See Also]]<nowiki>]</nowiki>
<! removed transcluded page call, red link never existed >
</span>
{{SeeAlso:JButtonSeparator/render}}


===Examples===
===Examples===
<CodeExamplesForm />
=== Code Examples ===
<dpl>
<dpl>
  noresultsheader=\n
  noresultsheader=\n
  category=render
  category=render
  category=JButtonSeparator
  category=JButtonSeparator
  category=CodeExample
  namespace=CodeExample
  category=MethodExample
  category=MethodExample
  include=*
  include=*
  format= ,,,
  format= ,,,
</dpl>
</dpl>
[[Category:Archived pages API16]]

Latest revision as of 01:21, 25 March 2017

<! removed transcluded page call, red link never existed >

Syntax

render(&$definition)
Parameter Name Default Value Description
&$definition

Defined in

libraries/joomla/html/toolbar/button/separator.php

Importing

jimport( 'joomla.html.toolbar.button.separator' );

Source Body

public function render(&$definition)
{
        // Initialise variables.
        $class  = null;
        $style  = null;

        // Separator class name
        $class = (empty($definition[1])) ? 'spacer' : $definition[1];
        // Custom width
        $style = (empty($definition[2])) ? null : ' style="width:' .  intval($definition[2]) . 'px;"';

        return '<li class="' . $class . '"' . $style . ">\n</li>\n";
}


<! removed transcluded page call, red link never existed >

Examples

Code Examples