\Kendo\UI\PDFViewerToolbarItem

A PHP class representing the item setting of PDFViewerToolbarItems.

Methods

attributes

Specifies the HTML attributes of a ToolBar button.

Returns

\Kendo\UI\PDFViewerToolbarItem

Parameters

$value ``

click

Specifies the click event handler of the button.

Returns

\Kendo\UI\PDFViewerToolbarItem

Parameters

$value \Kendo\JavaScriptFunction

Example

<?php
$item = new \Kendo\UI\PDFViewerToolbarItem();
$item->click(new \Kendo\JavaScriptFunction('function() { }'));
?>

command

Default commands in the PDFViewer are: OpenCommand; PageChangeCommand or DownloadCommand.

Returns

\Kendo\UI\PDFViewerToolbarItem

Parameters

$value string

Example

<?php
$item = new \Kendo\UI\PDFViewerToolbarItem();
$item->command('value');
?>

enable

Specifies whether the control is initially enabled or disabled. Default value is "true".

Returns

\Kendo\UI\PDFViewerToolbarItem

Parameters

$value boolean

Example

<?php
$item = new \Kendo\UI\PDFViewerToolbarItem();
$item->enable(true);
?>

hidden

Determines if a button is visible or hidden. By default buttons are visible.

Returns

\Kendo\UI\PDFViewerToolbarItem

Parameters

$value boolean

Example

<?php
$item = new \Kendo\UI\PDFViewerToolbarItem();
$item->hidden(true);
?>

icon

Sets icon for the item. The icon should be one of the existing in the Kendo UI theme sprite.

Returns

\Kendo\UI\PDFViewerToolbarItem

Parameters

$value string

Example

<?php
$item = new \Kendo\UI\PDFViewerToolbarItem();
$item->icon('value');
?>

id

Specifies the ID of the button.

Returns

\Kendo\UI\PDFViewerToolbarItem

Parameters

$value string

Example

<?php
$item = new \Kendo\UI\PDFViewerToolbarItem();
$item->id('value');
?>

imageUrl

If set, the ToolBar will render an image with the specified URL in the button.

Returns

\Kendo\UI\PDFViewerToolbarItem

Parameters

$value string

Example

<?php
$item = new \Kendo\UI\PDFViewerToolbarItem();
$item->imageUrl('value');
?>

name

Specifies the tool's name. Tool definition will be taken from the default collection - kendo.pdfviewer.DefaultTools

Returns

\Kendo\UI\PDFViewerToolbarItem

Parameters

$value string

Example

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

overflow

Returns

\Kendo\UI\PDFViewerToolbarItem

Parameters

$value string

Example

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

primary

Specifies whether the button is primary. Primary buttons receive different styling.

Returns

\Kendo\UI\PDFViewerToolbarItem

Parameters

$value boolean

Example

<?php
$item = new \Kendo\UI\PDFViewerToolbarItem();
$item->primary(true);
?>

showIcon

Specifies where the button icon will be displayed. Possible values are: "toolbar", "overflow" or "both" (default).

Returns

\Kendo\UI\PDFViewerToolbarItem

Parameters

$value string

Example

<?php
$item = new \Kendo\UI\PDFViewerToolbarItem();
$item->showIcon('value');
?>

showText

Specifies where the text will be displayed. Possible values are: "toolbar", "overflow" or "both" (default).

Returns

\Kendo\UI\PDFViewerToolbarItem

Parameters

$value string

Example

<?php
$item = new \Kendo\UI\PDFViewerToolbarItem();
$item->showText('value');
?>

spriteCssClass

Defines a CSS class (or multiple classes separated by spaces) which will be used for button icon.

Returns

\Kendo\UI\PDFViewerToolbarItem

Parameters

$value string

Example

<?php
$item = new \Kendo\UI\PDFViewerToolbarItem();
$item->spriteCssClass('value');
?>

template

Specifies what element will be added in the ToolBar wrapper. Items with template does not have a type.

Returns

\Kendo\UI\PDFViewerToolbarItem

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string

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

Example - using \Kendo\JavaScriptFunction

<?php
$item = new \Kendo\UI\PDFViewerToolbarItem();
$item->template(new \Kendo\JavaScriptFunction('function() { }'));
?>

text

Sets the text of the button.

Returns

\Kendo\UI\PDFViewerToolbarItem

Parameters

$value string

Example

<?php
$item = new \Kendo\UI\PDFViewerToolbarItem();
$item->text('value');
?>

togglable

Specifies if the button is togglable, e.g. has a selected and unselected state.

Returns

\Kendo\UI\PDFViewerToolbarItem

Parameters

$value boolean

Example

<?php
$item = new \Kendo\UI\PDFViewerToolbarItem();
$item->togglable(true);
?>

toggle

Specifies the toggle event handler of the button. Applicable only for commands of type button and togglable: true.

Returns

\Kendo\UI\PDFViewerToolbarItem

Parameters

$value \Kendo\JavaScriptFunction

Example

<?php
$item = new \Kendo\UI\PDFViewerToolbarItem();
$item->toggle(new \Kendo\JavaScriptFunction('function() { }'));
?>

type

Returns

\Kendo\UI\PDFViewerToolbarItem

Parameters

$value string

Example

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