\Kendo\UI\ChipList

A PHP wrapper for Kendo UI ChipList.

Inherits from \Kendo\UI\Widget.

Usage

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

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

// Configure it
$chipList->fillMode('value')

// Output it

echo $chipList->render();
?>

Methods

fillMode

Sets a value controlling how the color is applied.

Returns

\Kendo\UI\ChipList

Parameters

$value string

Example

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

itemSize

Specifies the size of the chip.

Returns

\Kendo\UI\ChipList

Parameters

$value string

Example

<?php
$chipList = new \Kendo\UI\ChipList('ChipList');
$chipList->itemSize('value');
?>

addItem

Adds one or more ChipListItem to the ChipList.

Returns

\Kendo\UI\ChipList

Parameters

$value[, $value2, ...] \Kendo\UI\ChipListItem|array

Example - using \Kendo\UI\ChipListItem

<?php
$chipList = new \Kendo\UI\ChipList('ChipList');
$item = new \Kendo\UI\ChipListItem();
$avatarClass = 'value';
$item->avatarClass($avatarClass);
$chipList->addItem($item);
?>

Example - using array

<?php
$chipList = new \Kendo\UI\ChipList('ChipList');
$avatarClass = 'value';
$chipList->addItem(array('avatarClass' => $avatarClass));
?>

Example - adding more than one ChipListItem

<?php
$chipList = new \Kendo\UI\ChipList('ChipList');
$first  = new \Kendo\UI\ChipListItem();
$second = new \Kendo\UI\ChipListItem();
$chipList->addItem($first, $second);
?>

removable

Specifies if the Chip items will be removable or not. If the property is set to true, the Chip renders a remove icon.

Returns

\Kendo\UI\ChipList

Parameters

$value boolean

Example

<?php
$chipList = new \Kendo\UI\ChipList('ChipList');
$chipList->removable(true);
?>

remove

Fires when the user clicks the remove icon of the Chip. For additional information check the remove event documentation.

Returns

\Kendo\UI\ChipList

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$chipList = new \Kendo\UI\ChipList('ChipList');
$chipList->remove('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onRemove(e) {
        // handle the remove event.
    }
</script>
<?php
$chipList = new \Kendo\UI\ChipList('ChipList');
$chipList->remove('onRemove');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$chipList = new \Kendo\UI\ChipList('ChipList');
$chipList->remove(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

rounded

Sets a value controlling the border radius.

Returns

\Kendo\UI\ChipList

Parameters

$value string

Example

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

select

Fires when the user changes a Chip selection in the ChipList. For additional information check the select event documentation.

Returns

\Kendo\UI\ChipList

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$chipList = new \Kendo\UI\ChipList('ChipList');
$chipList->select('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onSelect(e) {
        // handle the select event.
    }
</script>
<?php
$chipList = new \Kendo\UI\ChipList('ChipList');
$chipList->select('onSelect');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$chipList = new \Kendo\UI\ChipList('ChipList');
$chipList->select(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

selectable

Sets the selection mode of the ChipList.

Returns

\Kendo\UI\ChipList

Parameters

$value string

Example

<?php
$chipList = new \Kendo\UI\ChipList('ChipList');
$chipList->selectable('value');
?>

size

Specifies the gap between the Chips in the ChipList.

Returns

\Kendo\UI\ChipList

Parameters

$value string

Example

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