\Kendo\UI\Window

A PHP wrapper for Kendo UI Window.

Inherits from \Kendo\UI\Widget.

Usage

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

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

// Configure it
$window->animation(true)

// Output it

echo $window->render();
?>

Methods

actions

The buttons for interacting with the Window.The predefined array values are: Close; Refresh; Minimize; Maximize or Pin.

Returns

\Kendo\UI\Window

Parameters

$value array

Example

<?php
$window = new \Kendo\UI\Window('Window');
$window->actions(array());
?>

activate

Triggered when a Window has finished its opening animation. For additional information check the activate event documentation.

Returns

\Kendo\UI\Window

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$window = new \Kendo\UI\Window('Window');
$window->activate('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onActivate(e) {
        // handle the activate event.
    }
</script>
<?php
$window = new \Kendo\UI\Window('Window');
$window->activate('onActivate');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$window = new \Kendo\UI\Window('Window');
$window->activate(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

animation

A collection of {Animation} objects that is used to change the default animations. When set to false, all animations will be disabled.

Returns

\Kendo\UI\Window

Parameters

$value boolean|\Kendo\UI\WindowAnimation|array

Example - using boolean

<?php
$window = new \Kendo\UI\Window('Window');
$window->animation(true);
?>

Example - using \Kendo\UI\WindowAnimation

<?php
$window = new \Kendo\UI\Window('Window');
$animation = new \Kendo\UI\WindowAnimation();
$close = new \Kendo\UI\WindowAnimationClose();
$animation->close($close);
$window->animation($animation);
?>

Example - using array

<?php
$window = new \Kendo\UI\Window('Window');
$close = new \Kendo\UI\WindowAnimationClose();
$window->animation(array('close' => $close));
?>

appendTo

The element to which the Window will be appended. It is beneficial to use the Window together with a form which does not constrain the dragging of the Window within the specific element. For such scenarios, use the draggable.containment setting.

Returns

\Kendo\UI\Window

Parameters

$value |string

Example - using

<?php
$window = new \Kendo\UI\Window('Window');
$window->appendTo(new ());
?>

Example - using string

<?php
$window = new \Kendo\UI\Window('Window');
$window->appendTo('value');
?>

autoFocus

Determines whether the Window will be focused automatically when opened. The property also influences the focus behavior when an already opened Window is clicked.

Returns

\Kendo\UI\Window

Parameters

$value boolean

Example

<?php
$window = new \Kendo\UI\Window('Window');
$window->autoFocus(true);
?>

close

Triggered when a Window is closed either by the user or through the close() method. For additional information check the close event documentation.

Returns

\Kendo\UI\Window

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$window = new \Kendo\UI\Window('Window');
$window->close('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onClose(e) {
        // handle the close event.
    }
</script>
<?php
$window = new \Kendo\UI\Window('Window');
$window->close('onClose');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$window = new \Kendo\UI\Window('Window');
$window->close(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

content

Sets the HTML content of the Window.

Returns

Window

$value string

Example

<?php
$window = new \Kendo\UI\Window('Window');
$window->content('<strong>Content</strong>');
?>

deactivate

Triggered when a Window has finished its closing animation. For additional information check the deactivate event documentation.

Returns

\Kendo\UI\Window

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$window = new \Kendo\UI\Window('Window');
$window->deactivate('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onDeactivate(e) {
        // handle the deactivate event.
    }
</script>
<?php
$window = new \Kendo\UI\Window('Window');
$window->deactivate('onDeactivate');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$window = new \Kendo\UI\Window('Window');
$window->deactivate(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

dragend

Triggered when a Window has been moved by the user. For additional information check the dragend event documentation.

Returns

\Kendo\UI\Window

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$window = new \Kendo\UI\Window('Window');
$window->dragend('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onDragend(e) {
        // handle the dragend event.
    }
</script>
<?php
$window = new \Kendo\UI\Window('Window');
$window->dragend('onDragend');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$window = new \Kendo\UI\Window('Window');
$window->dragend(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

draggable

Enables (true) or disables (false) the dragging of the widget.

Returns

\Kendo\UI\Window

Parameters

$value boolean|\Kendo\UI\WindowDraggable|array

Example - using boolean

<?php
$window = new \Kendo\UI\Window('Window');
$window->draggable(true);
?>

Example - using \Kendo\UI\WindowDraggable

<?php
$window = new \Kendo\UI\Window('Window');
$draggable = new \Kendo\UI\WindowDraggable();
$axis = 'value';
$draggable->axis($axis);
$window->draggable($draggable);
?>

Example - using array

<?php
$window = new \Kendo\UI\Window('Window');
$axis = 'value';
$window->draggable(array('axis' => $axis));
?>

dragstart

Triggered when the user starts to move the Window. For additional information check the dragstart event documentation.

Returns

\Kendo\UI\Window

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$window = new \Kendo\UI\Window('Window');
$window->dragstart('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onDragstart(e) {
        // handle the dragstart event.
    }
</script>
<?php
$window = new \Kendo\UI\Window('Window');
$window->dragstart('onDragstart');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$window = new \Kendo\UI\Window('Window');
$window->dragstart(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

endContent

Stops output bufferring and sets the preceding markup as the content of the Window.

Example

<?php
$window = new \Kendo\UI\Window('Window');
$window->startContent();
?>
<strong>Content</strong>
<?php
$window->endContent(); // content is set to <strong>Content</strong>
?>

error

Triggered when an Ajax request for content fails. For additional information check the error event documentation.

Returns

\Kendo\UI\Window

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$window = new \Kendo\UI\Window('Window');
$window->error('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onError(e) {
        // handle the error event.
    }
</script>
<?php
$window = new \Kendo\UI\Window('Window');
$window->error('onError');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$window = new \Kendo\UI\Window('Window');
$window->error(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

height

Specifies the height of the Window.

Returns

\Kendo\UI\Window

Parameters

$value float|string

Example - using float

<?php
$window = new \Kendo\UI\Window('Window');
$window->height(1);
?>

Example - using string

<?php
$window = new \Kendo\UI\Window('Window');
$window->height('value');
?>

iframe

Explicitly states whether a content iframe will be created. For more information, refer to the documentation on using iframes.

Returns

\Kendo\UI\Window

Parameters

$value boolean

Example

<?php
$window = new \Kendo\UI\Window('Window');
$window->iframe(true);
?>

maxHeight

The maximum height (in pixels) that may be achieved by resizing the Window.

Returns

\Kendo\UI\Window

Parameters

$value float

Example

<?php
$window = new \Kendo\UI\Window('Window');
$window->maxHeight(1);
?>

maxWidth

The maximum width (in pixels) that may be achieved by resizing the Window.

Returns

\Kendo\UI\Window

Parameters

$value float

Example

<?php
$window = new \Kendo\UI\Window('Window');
$window->maxWidth(1);
?>

maximize

Triggered when the user maximizes the Window. Introduced in 2016.Q1.SP1. For additional information check the maximize event documentation.

Returns

\Kendo\UI\Window

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$window = new \Kendo\UI\Window('Window');
$window->maximize('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onMaximize(e) {
        // handle the maximize event.
    }
</script>
<?php
$window = new \Kendo\UI\Window('Window');
$window->maximize('onMaximize');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$window = new \Kendo\UI\Window('Window');
$window->maximize(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

minHeight

The minimum height (in pixels) that may be achieved by resizing the Window.

Returns

\Kendo\UI\Window

Parameters

$value float

Example

<?php
$window = new \Kendo\UI\Window('Window');
$window->minHeight(1);
?>

minWidth

The minimum width (in pixels) that may be achieved by resizing the Window.

Returns

\Kendo\UI\Window

Parameters

$value float

Example

<?php
$window = new \Kendo\UI\Window('Window');
$window->minWidth(1);
?>

minimize

Triggered when the user minimizes the Window. Introduced in 2016.Q1.SP1. For additional information check the minimize event documentation.

Returns

\Kendo\UI\Window

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$window = new \Kendo\UI\Window('Window');
$window->minimize('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onMinimize(e) {
        // handle the minimize event.
    }
</script>
<?php
$window = new \Kendo\UI\Window('Window');
$window->minimize('onMinimize');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$window = new \Kendo\UI\Window('Window');
$window->minimize(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

Specifies whether the Window will display a modal overlay over the page.

Returns

\Kendo\UI\Window

Parameters

$value boolean|\Kendo\UI\WindowModal|array

Example - using boolean

<?php
$window = new \Kendo\UI\Window('Window');
$window->modal(true);
?>

Example - using \Kendo\UI\WindowModal

<?php
$window = new \Kendo\UI\Window('Window');
$modal = new \Kendo\UI\WindowModal();
$preventScroll = true;
$modal->preventScroll($preventScroll);
$window->modal($modal);
?>

Example - using array

<?php
$window = new \Kendo\UI\Window('Window');
$preventScroll = true;
$window->modal(array('preventScroll' => $preventScroll));
?>

open

Triggered when a Window is opened, that is, when the open() method is called. For additional information check the open event documentation.

Returns

\Kendo\UI\Window

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$window = new \Kendo\UI\Window('Window');
$window->open('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onOpen(e) {
        // handle the open event.
    }
</script>
<?php
$window = new \Kendo\UI\Window('Window');
$window->open('onOpen');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$window = new \Kendo\UI\Window('Window');
$window->open(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

pinned

Specifies whether the Window will be pinned, that is, that it will not move together with the page content during scrolling.

Returns

\Kendo\UI\Window

Parameters

$value boolean

Example

<?php
$window = new \Kendo\UI\Window('Window');
$window->pinned(true);
?>

position

A collection of one or two members which define the initial top and/or left position of the Window or the position of the containment element on the page.

Returns

\Kendo\UI\Window

Parameters

$value \Kendo\UI\WindowPosition|array

Example - using \Kendo\UI\WindowPosition

<?php
$window = new \Kendo\UI\Window('Window');
$position = new \Kendo\UI\WindowPosition();
$left = 1;
$position->left($left);
$window->position($position);
?>

Example - using array

<?php
$window = new \Kendo\UI\Window('Window');
$left = 1;
$window->position(array('left' => $left));
?>

refresh

Triggered when the content of a Window has finished loading via Ajax, when the Window iframe has finished loading, or when the Refresh button has been clicked on a Window with static content. For additional information check the refresh event documentation.

Returns

\Kendo\UI\Window

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$window = new \Kendo\UI\Window('Window');
$window->refresh('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onRefresh(e) {
        // handle the refresh event.
    }
</script>
<?php
$window = new \Kendo\UI\Window('Window');
$window->refresh('onRefresh');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$window = new \Kendo\UI\Window('Window');
$window->refresh(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

resizable

Enables (true) or disables (false) the resizing of the Window.

Returns

\Kendo\UI\Window

Parameters

$value boolean

Example

<?php
$window = new \Kendo\UI\Window('Window');
$window->resizable(true);
?>

resize

Triggered when the user resizes the Window. For additional information check the resize event documentation.

Returns

\Kendo\UI\Window

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$window = new \Kendo\UI\Window('Window');
$window->resize('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onResize(e) {
        // handle the resize event.
    }
</script>
<?php
$window = new \Kendo\UI\Window('Window');
$window->resize('onResize');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$window = new \Kendo\UI\Window('Window');
$window->resize(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

scrollable

Enables (true) or disables (false) the scrolling of the Window contents.

Returns

\Kendo\UI\Window

Parameters

$value boolean

Example

<?php
$window = new \Kendo\UI\Window('Window');
$window->scrollable(true);
?>

size

Sets a predefined size to the Window. The width and height configuration options override the predefined size.The supported values are: auto; small; medium or large.

Returns

\Kendo\UI\Window

Parameters

$value string

Example

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

startContent

Starts output bufferring. Any following markup will be set as the content of the Window.

Example

<?php
$window = new \Kendo\UI\Window('Window');
$window->startContent();
?>
<strong>Content</strong>
<?php
$window->endContent(); // content is set to <strong>Content</strong>
?>

title

The text in the title bar of the Window. If set to false, the Window will be displayed without a title bar.

Returns

\Kendo\UI\Window

Parameters

$value string|boolean|\Kendo\UI\WindowTitle|array

Example - using string

<?php
$window = new \Kendo\UI\Window('Window');
$window->title('value');
?>

Example - using boolean

<?php
$window = new \Kendo\UI\Window('Window');
$window->title(true);
?>

Example - using \Kendo\UI\WindowTitle

<?php
$window = new \Kendo\UI\Window('Window');
$title = new \Kendo\UI\WindowTitle();
$encoded = true;
$title->encoded($encoded);
$window->title($title);
?>

Example - using array

<?php
$window = new \Kendo\UI\Window('Window');
$encoded = true;
$window->title(array('encoded' => $encoded));
?>

visible

Specifies whether the Window will be initially visible.

Returns

\Kendo\UI\Window

Parameters

$value boolean

Example

<?php
$window = new \Kendo\UI\Window('Window');
$window->visible(true);
?>

width

Specifies the width of the Window.

Returns

\Kendo\UI\Window

Parameters

$value float|string

Example - using float

<?php
$window = new \Kendo\UI\Window('Window');
$window->width(1);
?>

Example - using string

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