- md5
- bc2deb815389b792f371a1d8393dedf3
- sha1
- 5076e17ce4bb8ffb292ac8eb7ad07f23477b8898
- sha256
- c6c3d33066e2ebab666574272f4c134be147876df041bc0a894c14703f3b18a6
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
<?php
/**
* @package Joomla.Administrator
* @subpackage com_languages
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Component\Languages\Administrator\Service\HTML;
\defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
/**
* Utility class working with languages
*
* @since 1.6
*/
class Languages
{
/**
* Method to generate an information about the default language.
*
* @param boolean $published True if the language is the default.
*
* @return string HTML code.
*/
public function published($published)
{
if (!$published)
{
return ' ';
}
return HTMLHelper::_('image', 'menu/icon-16-default.png', Text::_('COM_LANGUAGES_HEADING_DEFAULT'), null, true);
}
/**
* Method to generate an input radio button.
*
* @param integer $rowNum The row number.
* @param string $language Language tag.
*
* @return string HTML code.
*/
public function id($rowNum, $language)
{
return '<input'
. ' type="radio"'
. ' id="cb' . $rowNum . '"'
. ' name="cid"'
. ' value="' . htmlspecialchars($language, ENT_COMPAT, 'UTF-8') . '"'
. ' onclick="Joomla.isChecked(this.checked);"'
. ' title="' . ($rowNum + 1) . '"'
. '>';
}
/**
* Method to generate an array of clients.
*
* @return array of client objects.
*/
public function clients()
{
return array(
HTMLHelper::_('select.option', 0, Text::_('JSITE')),
HTMLHelper::_('select.option', 1, Text::_('JADMINISTRATOR'))
);
}
/**
* Returns an array of published state filter options.
*
* @return string The HTML code for the select tag.
*
* @since 1.6
*/
public function publishedOptions()
{
// Build the active state filter options.
$options = array();
$options[] = HTMLHelper::_('select.option', '1', 'JPUBLISHED');
$options[] = HTMLHelper::_('select.option', '0', 'JUNPUBLISHED');
$options[] = HTMLHelper::_('select.option', '-2', 'JTRASHED');
$options[] = HTMLHelper::_('select.option', '*', 'JALL');
return $options;
}
}
The same content is in 5 releases, Joomla 4.0.0-beta to 4.0.0-beta5. See them all, or every version of this file.