\Kendo\UI\TextArea

A PHP wrapper for Kendo UI TextArea.

Inherits from \Kendo\UI\Widget.

Usage

To use TextArea 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 TextArea

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

// Configure it
$textArea->enable(true)

// Output it

echo $textArea->render();
?>

Methods

change

Fired when the value of the widget is changed by the user.The event handler function context (available through the keyword this) will be set to the widget instance. For additional information check the change event documentation.

Returns

\Kendo\UI\TextArea

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

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

Example - using string which defines a JavaScript name

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

Example - using \Kendo\JavaScriptFunction

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

enable

If set to false, the widget will be disabled and will not allow user input. The widget is enabled by default and allows user input.

Returns

\Kendo\UI\TextArea

Parameters

$value boolean

Example

<?php
$textArea = new \Kendo\UI\TextArea('TextArea');
$textArea->enable(true);
?>

fillMode

Sets a value controlling how the color is applied.

Returns

\Kendo\UI\TextArea

Parameters

$value string

Example

<?php
$textArea = new \Kendo\UI\TextArea('TextArea');
$textArea->fillMode('value');
?>

label

Adds a label before the textarea. If the textarea has no id attribute, a generated id will be assigned. The string and the function parameters are setting the inner HTML of the label.

Returns

\Kendo\UI\TextArea

Parameters

$value string|\Kendo\JavaScriptFunction|\Kendo\UI\TextAreaLabel|array

Example - using string

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

Example - using \Kendo\JavaScriptFunction

<?php
$textArea = new \Kendo\UI\TextArea('TextArea');
$textArea->label(new \Kendo\JavaScriptFunction('function() { }'));
?>

Example - using \Kendo\UI\TextAreaLabel

<?php
$textArea = new \Kendo\UI\TextArea('TextArea');
$label = new \Kendo\UI\TextAreaLabel();
$content = 'value';
$label->content($content);
$textArea->label($label);
?>

Example - using array

<?php
$textArea = new \Kendo\UI\TextArea('TextArea');
$content = 'value';
$textArea->label(array('content' => $content));
?>

layoutFlow

Defines the layout flow of the component.

Returns

\Kendo\UI\TextArea

Parameters

$value string

Example

<?php
$textArea = new \Kendo\UI\TextArea('TextArea');
$textArea->layoutFlow('value');
?>

maxLength

The maximum number of characters that the user can enter.

Returns

\Kendo\UI\TextArea

Parameters

$value float

Example

<?php
$textArea = new \Kendo\UI\TextArea('TextArea');
$textArea->maxLength(1);
?>

overflow

Defines how the content overflow should be handled

Returns

\Kendo\UI\TextArea

Parameters

$value string

Example

<?php
$textArea = new \Kendo\UI\TextArea('TextArea');
$textArea->overflow('value');
?>

placeholder

The hint displayed by the widget when it is empty. Not set by default.

Returns

\Kendo\UI\TextArea

Parameters

$value string

Example

<?php
$textArea = new \Kendo\UI\TextArea('TextArea');
$textArea->placeholder('value');
?>

prefixOptions

The configuration for the prefix adornment of the component.

Returns

\Kendo\UI\TextArea

Parameters

$value \Kendo\UI\TextAreaPrefixOptions|array

Example - using \Kendo\UI\TextAreaPrefixOptions

<?php
$textArea = new \Kendo\UI\TextArea('TextArea');
$prefixOptions = new \Kendo\UI\TextAreaPrefixOptions();
$icon = 'value';
$prefixOptions->icon($icon);
$textArea->prefixOptions($prefixOptions);
?>

Example - using array

<?php
$textArea = new \Kendo\UI\TextArea('TextArea');
$icon = 'value';
$textArea->prefixOptions(array('icon' => $icon));
?>

readonly

If set to true, the widget will be readonly and will not allow user input. The widget is not readonly by default and allows user input.

Returns

\Kendo\UI\TextArea

Parameters

$value boolean

Example

<?php
$textArea = new \Kendo\UI\TextArea('TextArea');
$textArea->readonly(true);
?>

resize

Defines how the widget should be resized

Returns

\Kendo\UI\TextArea

Parameters

$value string

Example

<?php
$textArea = new \Kendo\UI\TextArea('TextArea');
$textArea->resize('value');
?>

rounded

Sets a value controlling the border radius.

Returns

\Kendo\UI\TextArea

Parameters

$value string

Example

<?php
$textArea = new \Kendo\UI\TextArea('TextArea');
$textArea->rounded('value');
?>

rows

The number of visible text lines for the control.

Returns

\Kendo\UI\TextArea

Parameters

$value float

Example

<?php
$textArea = new \Kendo\UI\TextArea('TextArea');
$textArea->rows(1);
?>

size

Sets the size of the component.

Returns

\Kendo\UI\TextArea

Parameters

$value string

Example

<?php
$textArea = new \Kendo\UI\TextArea('TextArea');
$textArea->size('value');
?>

suffixOptions

The configuration for the suffix adornment of the component.

Returns

\Kendo\UI\TextArea

Parameters

$value \Kendo\UI\TextAreaSuffixOptions|array

Example - using \Kendo\UI\TextAreaSuffixOptions

<?php
$textArea = new \Kendo\UI\TextArea('TextArea');
$suffixOptions = new \Kendo\UI\TextAreaSuffixOptions();
$icon = 'value';
$suffixOptions->icon($icon);
$textArea->suffixOptions($suffixOptions);
?>

Example - using array

<?php
$textArea = new \Kendo\UI\TextArea('TextArea');
$icon = 'value';
$textArea->suffixOptions(array('icon' => $icon));
?>

value

The value of the widget.

Returns

\Kendo\UI\TextArea

Parameters

$value string

Example

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