- md5
- ffcddd66805dff0bb4d6cf9af86d2823
- sha1
- 97e14fcc4b9ccbdc8744e6d081f9d59bdc7fcc1d
- sha256
- edd3022bd9c60e2169a292b45c32a3a4747d6546d671ffa68ad8276a729f6ccc
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
<?php
/**
* Joomla! Content Management System
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\CMS\Form\Field;
\defined('JPATH_PLATFORM') or die;
use Joomla\CMS\Help\Help;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
/**
* Form Field class for the Joomla Platform.
* Provides a select list of help sites.
*
* @since 1.6
* @deprecated 4.0 To be removed
*/
class HelpsiteField extends ListField
{
/**
* The form field type.
*
* @var string
* @since 1.6
*/
public $type = 'Helpsite';
/**
* Method to get the help site field options.
*
* @return array The field option objects.
*
* @since 1.6
*/
protected function getOptions()
{
// Merge any additional options in the XML definition.
$options = array_merge(parent::getOptions(), Help::createSiteList(JPATH_ADMINISTRATOR . '/help/helpsites.xml', $this->value));
return $options;
}
/**
* Override to add refresh button
*
* @return string The field input markup.
*
* @since 3.2
*/
protected function getInput()
{
HTMLHelper::_('script', 'legacy/helpsite.js', array('version' => 'auto', 'relative' => true));
$showDefault = (string) $this->getAttribute('showDefault') === 'false' ? 'false' : 'true';
$html = parent::getInput();
$button = '<button
type="button"
class="btn btn-secondary"
id="helpsite-refresh"
rel="' . $this->id . '"
showDefault="' . $showDefault . '"
>
<span>' . Text::_('JGLOBAL_HELPREFRESH_BUTTON') . '</span>
</button>';
return $html . $button;
}
}
No other release has this exact content. See every version of this file.