\Kendo\UI\RadioButton

A PHP wrapper for Kendo UI RadioButton.

Inherits from \Kendo\UI\Widget.

Usage

To use RadioButton in a PHP page instantiate a new instance, configure it via the available configuration methods and output it by echo-ing the result of the render method.

Using Kendo RadioButton

<?php
// Create a new instance of RadioButton and specify its id
$radioButton = new \Kendo\UI\RadioButton('RadioButton');

// Configure it
$radioButton->checked(true)

// Output it

echo $radioButton->render();
?>

Methods

change

Fires when the checked state of the RadioButton is changed through user interaction. For additional information check the change event documentation.

Returns

\Kendo\UI\RadioButton

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$radioButton = new \Kendo\UI\RadioButton('RadioButton');
$radioButton->change('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onChange(e) {
        // handle the change event.
    }
</script>
<?php
$radioButton = new \Kendo\UI\RadioButton('RadioButton');
$radioButton->change('onChange');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$radioButton = new \Kendo\UI\RadioButton('RadioButton');
$radioButton->change(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

checked

The checked state of the RadioButton.

Returns

\Kendo\UI\RadioButton

Parameters

$value boolean

Example

<?php
$radioButton = new \Kendo\UI\RadioButton('RadioButton');
$radioButton->checked(true);
?>

enabled

If set to false, the RadioButton will be disabled and will not allow the user to change its checked state.

Returns

\Kendo\UI\RadioButton

Parameters

$value boolean

Example

<?php
$radioButton = new \Kendo\UI\RadioButton('RadioButton');
$radioButton->enabled(true);
?>

encoded

Determines whether the radio label content should be rendered as an HTML string or it should be encoded.

Returns

\Kendo\UI\RadioButton

Parameters

$value boolean

Example

<?php
$radioButton = new \Kendo\UI\RadioButton('RadioButton');
$radioButton->encoded(true);
?>

label

Specifies the label content for the radio.

Returns

\Kendo\UI\RadioButton

Parameters

$value string

Example

<?php
$radioButton = new \Kendo\UI\RadioButton('RadioButton');
$radioButton->label('value');
?>

size

Sets a value controlling the size of the component.

Returns

\Kendo\UI\RadioButton

Parameters

$value string

Example

<?php
$radioButton = new \Kendo\UI\RadioButton('RadioButton');
$radioButton->size('value');
?>
In this article
Not finding the help you need?