- md5
- 65f3b19171a717133a6b380229010287
- sha1
- 1e26eb3e22835f36b99cbd207e17049ca17dafa3
- sha256
- 87be6a2ae9c56a172283c616c63dd9b1a68b265b6a945d398abeb0f64380698c
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
<?php
/**
* Joomla! Content Management System
*
* @copyright Copyright (C) 2005 - 2017 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\Form\FormHelper;
FormHelper::loadFieldClass('list');
/**
* Form Field class for the Joomla Platform.
* Provides a list of access levels. Access levels control what users in specific
* groups can see.
*
* @see JAccess
* @since 11.1
*/
class AccesslevelField extends \JFormFieldList
{
/**
* The form field type.
*
* @var string
* @since 11.1
*/
protected $type = 'Accesslevel';
/**
* Method to get the field input markup.
*
* @return string The field input markup.
*
* @since 11.1
*/
protected function getInput()
{
$attr = '';
// Initialize some field attributes.
$attr .= !empty($this->class) ? ' class="custom-select ' . $this->class . '"' : ' class="custom-select"';
$attr .= $this->disabled ? ' disabled' : '';
$attr .= !empty($this->size) ? ' size="' . $this->size . '"' : '';
$attr .= $this->multiple ? ' multiple' : '';
$attr .= $this->required ? ' required aria-required="true"' : '';
$attr .= $this->autofocus ? ' autofocus' : '';
// Initialize JavaScript field attributes.
$attr .= $this->onchange ? ' onchange="' . $this->onchange . '"' : '';
// Get the field options.
$options = $this->getOptions();
return \JHtml::_('access.level', $this->name, $this->value, $attr, $options, $this->id);
}
}
No other release has this exact content. See every version of this file.