New to Telerik UI for PHP? Download free 30-day trial

\Kendo\UI\EditorTool

A PHP class representing the tool setting of EditorTools.

Methods

columns

Specifies the colors columns for "foreColor" and "backColor" tools when list of colors are defined.

Returns

\Kendo\UI\EditorTool

Parameters

$value float

Example

<?php
$tool = new \Kendo\UI\EditorTool();
$tool->columns(1);
?>

exec

The JavaScript function which will be executed when the end-user clicks the tool button.

Returns

\Kendo\UI\EditorTool

Parameters

$value \Kendo\JavaScriptFunction

Example

<?php
$tool = new \Kendo\UI\EditorTool();
$tool->exec(new \Kendo\JavaScriptFunction('function() { }'));
?>

addItem

Adds one or more EditorToolItem to the EditorTool.

Returns

\Kendo\UI\EditorTool

Parameters

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

Example - using \Kendo\UI\EditorToolItem

<?php
$tool = new \Kendo\UI\EditorTool();
$item = new \Kendo\UI\EditorToolItem();
$context = 'value';
$item->context($context);
$tool->addItem($item);
?>

Example - using array

<?php
$tool = new \Kendo\UI\EditorTool();
$context = 'value';
$tool->addItem(array('context' => $context));
?>

Example - adding more than one EditorToolItem

<?php
$tool = new \Kendo\UI\EditorTool();
$first  = new \Kendo\UI\EditorToolItem();
$second = new \Kendo\UI\EditorToolItem();
$tool->addItem($first, $second);
?>

name

When specifying a tool as an object, a tool name is required. Please note that "undo" and "redo" are reserved tool names.

Returns

\Kendo\UI\EditorTool

Parameters

$value string

Example

<?php
$tool = new \Kendo\UI\EditorTool();
$tool->name('value');
?>

palette

Specifies the color palette for "foreColor" and "backColor" tools. If you need to use the color gradient view in the picker instead of the palette, set this value to null.

Returns

\Kendo\UI\EditorTool

Parameters

$value string|array

Example - using string

<?php
$tool = new \Kendo\UI\EditorTool();
$tool->palette('value');
?>

Example - using array

<?php
$tool = new \Kendo\UI\EditorTool();
$tool->palette(array());
?>

template

The kendo template that will be used for rendering the given tool.

Returns

\Kendo\UI\EditorTool

Parameters

$value string

Example

<?php
$tool = new \Kendo\UI\EditorTool();
$tool->template('value');
?>

tooltip

The text which will be displayed when the end-user hovers the tool button with the mouse.

Returns

\Kendo\UI\EditorTool

Parameters

$value string

Example

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