CoreFiles by mySites.guru
VoteradioField.php61 lines, 1,200 bytes, from Joomla_4.0.0-alpha12-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha11
md5
72a47969c5b3e940acd1421f152ed6b9
sha1
6177bc1b7821a8482e90ff6ecf0f9669598a6d52
sha256
e30577bd8ad8da5d3b7199a132907ec9276bfe173f14e273db180f3655024fda
<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @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\Component\Content\Administrator\Field;

defined('_JEXEC') or die;

use Joomla\CMS\Form\Field\RadioField;
use Joomla\CMS\Plugin\PluginHelper;

/**
 * Voteradio Field class.
 *
 * @since  3.8.0
 */
class VoteradioField extends RadioField
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  3.7.1
	 */
	protected $type = 'Voteradio';

	/**
	 * Method to get the field Label.
	 *
	 * @return string The field label
	 *
	 * @throws \Exception
	 *
	 * @since  3.8.2
	 */
	public function getLabel()
	{
		// Requires vote plugin enabled
		return PluginHelper::isEnabled('content', 'vote') ? parent::getLabel() : null;
	}

	/**
	 * Method to get the field options.
	 *
	 * @return array The field option objects.
	 *
	 * @throws \Exception
	 *
	 * @since  3.7.1
	 */
	public function getOptions()
	{
		// Requires vote plugin enabled
		return PluginHelper::isEnabled('content', 'vote') ? parent::getOptions() : array();
	}
}

No other release has this exact content. See every version of this file.