PATH:
home
/
centosnipponia
/
public_html
/
nipponiacom2
/
libraries
/
src
/
Form
/
Field
<?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\Factory; use Joomla\CMS\Form\FormHelper; FormHelper::loadFieldClass('list'); /** * Form Field to load a list of content authors * * @since 3.2 */ class AuthorField extends \JFormFieldList { /** * The form field type. * * @var string * @since 3.2 */ public $type = 'Author'; /** * Cached array of the category items. * * @var array * @since 3.2 */ protected static $options = array(); /** * Method to get the options to populate list * * @return array The field option objects. * * @since 3.2 */ protected function getOptions() { // Accepted modifiers $hash = md5($this->element); if (!isset(static::$options[$hash])) { static::$options[$hash] = parent::getOptions(); $db = Factory::getDbo(); // Construct the query $query = $db->getQuery(true) ->select('u.id AS value, u.name AS text') ->from('#__users AS u') ->join('INNER', '#__content AS c ON c.created_by = u.id') ->group('u.id, u.name') ->order('u.name'); // Setup the query $db->setQuery($query); // Return the result if ($options = $db->loadObjectList()) { static::$options[$hash] = array_merge(static::$options[$hash], $options); } } return static::$options[$hash]; } }
[+]
..
[-] AuthorField.php
[edit]
[-] CaptchaField.php
[edit]
[-] ChromestyleField.php
[edit]
[-] ContenthistoryField.php
[edit]
[-] ContentlanguageField.php
[edit]
[-] ContenttypeField.php
[edit]
[-] EditorField.php
[edit]
[-] FrontendlanguageField.php
[edit]
[-] HeadertagField.php
[edit]
[-] HelpsiteField.php
[edit]
[-] LastvisitdaterangeField.php
[edit]
[-] LimitboxField.php
[edit]
[-] MediaField.php
[edit]
[-] MenuField.php
[edit]
[-] MenuitemField.php
[edit]
[-] ModuleorderField.php
[edit]
[-] ModulepositionField.php
[edit]
[-] ModuletagField.php
[edit]
[-] OrderingField.php
[edit]
[-] PluginstatusField.php
[edit]
[-] RedirectStatusField.php
[edit]
[-] RegistrationdaterangeField.php
[edit]
[-] StatusField.php
[edit]
[-] TagField.php
[edit]
[-] TemplatestyleField.php
[edit]
[-] UseractiveField.php
[edit]
[-] UserField.php
[edit]
[-] UsergrouplistField.php
[edit]
[-] UserstateField.php
[edit]
[-] .htaccess.disabled
[edit]