\Kendo\UI\Popup
A PHP wrapper for Kendo UI Popup.
Inherits from \Kendo\UI\Widget.
Usage
To use Popup 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 Popup
<?php
// Create a new instance of Popup and specify its id
$popup = new \Kendo\UI\Popup('Popup');
// Configure it
$popup->anchor('value')
// Output it
echo $popup->render();
?>
Methods
activate
Fires when the popup is opened For additional information check the activate event documentation.
Returns
\Kendo\UI\Popup
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$popup = new \Kendo\UI\Popup('Popup');
$popup->activate('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onActivate(e) {
// handle the activate event.
}
</script>
<?php
$popup = new \Kendo\UI\Popup('Popup');
$popup->activate('onActivate');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$popup = new \Kendo\UI\Popup('Popup');
$popup->activate(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
adjustSize
Configures the margins, which will be added to the popup size, if its position should end up being next to the viewport edges. By default, the adjustment amount in both dimensions is zero.The property takes effect only if collision is set to "fit" for the respective dimension (width or height).
Returns
\Kendo\UI\Popup
Parameters
$value ``
anchor
Specifies the element that will be used as an anchor. The widget will open next to that element.
Returns
\Kendo\UI\Popup
Parameters
$value string|
Example - using string
<?php
$popup = new \Kendo\UI\Popup('Popup');
$popup->anchor('value');
?>
animation
Configures the opening and closing animations of the popup. Setting the animation option to false will disable the opening and closing animations. As a result the popup will open and close instantly. is not a valid configuration.
Returns
\Kendo\UI\Popup
Parameters
$value boolean|\Kendo\UI\PopupAnimation|array
Example - using boolean
<?php
$popup = new \Kendo\UI\Popup('Popup');
$popup->animation(true);
?>
Example - using \Kendo\UI\PopupAnimation
<?php
$popup = new \Kendo\UI\Popup('Popup');
$animation = new \Kendo\UI\PopupAnimation();
$close = new \Kendo\UI\PopupAnimationClose();
$animation->close($close);
$popup->animation($animation);
?>
Example - using array
<?php
$popup = new \Kendo\UI\Popup('Popup');
$close = new \Kendo\UI\PopupAnimationClose();
$popup->animation(array('close' => $close));
?>
appendTo
Which element the popup will be appended to. The element needs to be relatively positioned.
Returns
\Kendo\UI\Popup
Parameters
$value string|
Example - using string
<?php
$popup = new \Kendo\UI\Popup('Popup');
$popup->appendTo('value');
?>
close
Fires when the popup closes For additional information check the close event documentation.
Returns
\Kendo\UI\Popup
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$popup = new \Kendo\UI\Popup('Popup');
$popup->close('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onClose(e) {
// handle the close event.
}
</script>
<?php
$popup = new \Kendo\UI\Popup('Popup');
$popup->close('onClose');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$popup = new \Kendo\UI\Popup('Popup');
$popup->close(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
collision
Configures how the popup should behave when it cannot be properly displayed and fully visible, if its origin and position settings are obeyed.Valid values are: "fit", "flip", "flip fit" and "fit flip". "Fit" allows the popup to be shifted (moved) until it is fully visible. "Flip" allows the popup to switch its position, according to its anchor. If two words are used, the first one applies to the vertical dimension and the second one - to the horizontal dimension. If one word is used, the setting is applied to both dimensions.
Returns
\Kendo\UI\Popup
Parameters
$value string
Example
<?php
$popup = new \Kendo\UI\Popup('Popup');
$popup->collision('value');
?>
deactivate
Fires when the popup is closed For additional information check the deactivate event documentation.
Returns
\Kendo\UI\Popup
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$popup = new \Kendo\UI\Popup('Popup');
$popup->deactivate('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onDeactivate(e) {
// handle the deactivate event.
}
</script>
<?php
$popup = new \Kendo\UI\Popup('Popup');
$popup->deactivate('onDeactivate');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$popup = new \Kendo\UI\Popup('Popup');
$popup->deactivate(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
open
Fires when the popup opens For additional information check the open event documentation.
Returns
\Kendo\UI\Popup
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$popup = new \Kendo\UI\Popup('Popup');
$popup->open('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onOpen(e) {
// handle the open event.
}
</script>
<?php
$popup = new \Kendo\UI\Popup('Popup');
$popup->open('onOpen');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$popup = new \Kendo\UI\Popup('Popup');
$popup->open(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
origin
Specifies how to position the popup element based on anchor point. The value is space separated "y" plus "x" position.The available "y" positions are: - "bottom" - "center" - "top"The available "x" positions are: - "left" - "center" - "right"
Returns
\Kendo\UI\Popup
Parameters
$value string
Example
<?php
$popup = new \Kendo\UI\Popup('Popup');
$popup->origin('value');
?>
position
Specifies which point of the popup element to attach to the anchor's origin point. The value is space separated "y" plus "x" position.The available "y" positions are: - "bottom" - "center" - "top"The available "x" positions are: - "left" - "center" - "right"
Returns
\Kendo\UI\Popup
Parameters
$value string
Example
<?php
$popup = new \Kendo\UI\Popup('Popup');
$popup->position('value');
?>