Source for file separator.php

Documentation is available at separator.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Libraries
  4.  * @subpackage  Toolbar
  5.  *
  6.  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
  7.  * @license     GNU General Public License version 2 or later; see LICENSE
  8.  */
  9.  
  10. defined('JPATH_PLATFORM'or die;
  11.  
  12. /**
  13.  * Renders a button separator
  14.  *
  15.  * @package     Joomla.Libraries
  16.  * @subpackage  Toolbar
  17.  * @since       3.0
  18.  */
  19. {
  20.     /**
  21.      * Button type
  22.      *
  23.      * @var   string 
  24.      */
  25.     protected $_name = 'Separator';
  26.  
  27.     /**
  28.      * Get the HTML for a separator in the toolbar
  29.      *
  30.      * @param   array  &$definition  Class name and custom width
  31.      *
  32.      * @return  string  The HTML for the separator
  33.      *
  34.      * @see     JToolbarButton::render()
  35.      * @since   3.0
  36.      */
  37.     public function render(&$definition)
  38.     {
  39.         // Store all data to the options array for use with JLayout
  40.         $options array();
  41.  
  42.         // Separator class name
  43.         $options['class'(empty($definition[1])) '' $definition[1];
  44.  
  45.         // Custom width
  46.         $options['style'(empty($definition[2])) '' ' style="width:' . (int) $definition[2'px;"';
  47.  
  48.         // Instantiate a new JLayoutFile instance and render the layout
  49.         $layout new JLayoutFile('joomla.toolbar.separator');
  50.  
  51.         return $layout->render($options);
  52.     }
  53.  
  54.     /**
  55.      * Empty implementation (not required for separator)
  56.      *
  57.      * @return  void 
  58.      *
  59.      * @since   3.0
  60.      */
  61.     public function fetchButton()
  62.     {
  63.     }
  64. }

Documentation generated on Tue, 19 Nov 2013 15:12:50 +0100 by phpDocumentor 1.4.3