Source for file helpsite.php

Documentation is available at helpsite.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Libraries
  4.  * @subpackage  Form
  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. /**
  14.  * Form Field class for the Joomla Platform.
  15.  * Provides a select list of help sites.
  16.  *
  17.  * @package     Joomla.Libraries
  18.  * @subpackage  Form
  19.  * @since       1.6
  20.  */
  21. {
  22.     /**
  23.      * The form field type.
  24.      *
  25.      * @var    string 
  26.      * @since  1.6
  27.      */
  28.     public $type = 'Helpsite';
  29.  
  30.     /**
  31.      * Method to get the help site field options.
  32.      *
  33.      * @return  array  The field option objects.
  34.      *
  35.      * @since   1.6
  36.      */
  37.     protected function getOptions()
  38.     {
  39.         // Merge any additional options in the XML definition.
  40.         $options array_merge(parent::getOptions()JHelp::createSiteList(JPATH_ADMINISTRATOR '/help/helpsites.xml'$this->value));
  41.  
  42.         return $options;
  43.     }
  44.  
  45.     /**
  46.      * Override to add refresh button
  47.      *
  48.      * @return  string  The field input markup.
  49.      *
  50.      * @since   3.2
  51.      */
  52.     protected function getInput()
  53.     {
  54.         JHtml::script('system/helpsite.js'falsetrue);
  55.         JFactory::getDocument()->addScriptDeclaration(
  56.             'var helpsite_base = "' addslashes(JUri::root()) '";'
  57.         );
  58.  
  59.         $html parent::getInput();
  60.         $button '<button type="button" class="btn btn-small" id="helpsite-refresh" rel="' $this->id . '"><span>' JText::_('JGLOBAL_HELPREFRESH_BUTTON''</span></button>';
  61.  
  62.         return $html $button;
  63.     }
  64. }

Documentation generated on Tue, 19 Nov 2013 15:04:41 +0100 by phpDocumentor 1.4.3