API15

JButtonSeparator/render: Difference between revisions

From Joomla! Documentation

m clean up
m preparing for archive only
 
Line 44: Line 44:


===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=*

Latest revision as of 00: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

function render( &$definition )
{
        /*
         * Initialize variables
         */
        $html   = null;
        $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 '<td class="' . $class . '"' . $style . ">\n</td>\n";
}


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

Examples

Code Examples