__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
/**
* @package Joomla.Plugin
* @subpackage Fields.Radio
*
* @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace
*/
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects
/**
* Fields Radio Plugin
*
* @since 3.7.0
*/
class PlgFieldsRadio extends \Joomla\Component\Fields\Administrator\Plugin\FieldsListPlugin
{
/**
* Before prepares the field value.
*
* @param string $context The context.
* @param \stdclass $item The item.
* @param \stdclass $field The field.
*
* @return void
*
* @since 3.7.0
*/
public function onCustomFieldsBeforePrepareField($context, $item, $field)
{
if (!$this->app->isClient('api')) {
return;
}
if (!$this->isTypeSupported($field->type)) {
return;
}
$options = $this->getOptionsFromField($field);
$field->apivalue = [$field->value => $options[$field->value]];
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| params | Folder | 0775 |
|
|
| tmpl | Folder | 0775 |
|
|
| radio.php | File | 1.17 KB | 0664 |
|
| radio.xml | File | 1.42 KB | 0664 |
|