CoreFiles by mySites.guru
RadiobasicField.php66 lines, 1,431 bytes, from Joomla_4.2.0-Stable-Full_Package.zip
Raw History Compare with 4.1.5
md5
e9bb3dc034afdeff073da2c348d02260
sha1
5f8f48b5100557fe3dde22e0eb0cf3dbe5a07d53
sha256
f68c18e2d0587c643c926c222a844a2293c86b1d3136ab9936e3cd8f51a85891
<?php

/**
 * Joomla! Content Management System
 *
 * @copyright  (C) 2016 Open Source Matters, Inc. <https://www.joomla.org>
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\CMS\Form\Field;

/**
 * Form Field class for the Joomla Platform.
 * Provides radio button inputs using default styling
 *
 * @since  4.0.0
 */
class RadiobasicField extends ListField
{
    /**
     * The form field type.
     *
     * @var    string
     * @since  4.0.0
     */
    protected $type = 'Radiobasic';

    /**
     * Name of the layout being used to render the field
     *
     * @var    string
     * @since  4.0.0
     */
    protected $layout = 'joomla.form.field.radiobasic';

    /**
     * Method to get the radio button field input markup.
     *
     * @return  string  The field input markup.
     *
     * @since   4.0.0
     */
    protected function getInput()
    {
        return $this->getRenderer($this->layout)->render($this->getLayoutData());
    }

    /**
     * Method to get the data to be passed to the layout for rendering.
     *
     * @return  array
     *
     * @since   4.0.0
     */
    protected function getLayoutData()
    {
        $data = parent::getLayoutData();

        $extraData = array(
            'options' => $this->getOptions(),
            'value'   => (string) $this->value
        );

        return array_merge($data, $extraData);
    }
}

The same content is in 5 releases, Joomla 4.2.0-beta3 to 4.2.1-rc2. See them all, or every version of this file.