\Kendo\UI\AppBar

A PHP wrapper for Kendo UI AppBar.

Inherits from \Kendo\UI\Widget.

Usage

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

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

// Configure it
$appBar->position('value')

// Output it

echo $appBar->render();
?>

Methods

addItem

Adds one or more AppBarItem to the AppBar.

Returns

\Kendo\UI\AppBar

Parameters

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

Example - using \Kendo\UI\AppBarItem

<?php
$appBar = new \Kendo\UI\AppBar('AppBar');
$item = new \Kendo\UI\AppBarItem();
$className = 'value';
$item->className($className);
$appBar->addItem($item);
?>

Example - using array

<?php
$appBar = new \Kendo\UI\AppBar('AppBar');
$className = 'value';
$appBar->addItem(array('className' => $className));
?>

Example - adding more than one AppBarItem

<?php
$appBar = new \Kendo\UI\AppBar('AppBar');
$first  = new \Kendo\UI\AppBarItem();
$second = new \Kendo\UI\AppBarItem();
$appBar->addItem($first, $second);
?>

position

Defines where in the page the AppBar will be positioned

Returns

\Kendo\UI\AppBar

Parameters

$value string

Example

<?php
$appBar = new \Kendo\UI\AppBar('AppBar');
$appBar->position('value');
?>

positionMode

Defines the type of positioning

Returns

\Kendo\UI\AppBar

Parameters

$value string

Example

<?php
$appBar = new \Kendo\UI\AppBar('AppBar');
$appBar->positionMode('value');
?>

resize

Fired when the window is resized. For additional information check the resize event documentation.

Returns

\Kendo\UI\AppBar

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

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

Example - using string which defines a JavaScript name

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

Example - using \Kendo\JavaScriptFunction

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

themeColor

Specifies the color of the component

Returns

\Kendo\UI\AppBar

Parameters

$value string

Example

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