\Kendo\UI\TileLayout

A PHP wrapper for Kendo UI TileLayout.

Inherits from \Kendo\UI\Widget.

Usage

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

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

// Configure it
$tileLayout->columns(1)

// Output it

echo $tileLayout->render();
?>

Methods

columns

Defines the number of columns.

Returns

\Kendo\UI\TileLayout

Parameters

$value float

Example

<?php
$tileLayout = new \Kendo\UI\TileLayout('TileLayout');
$tileLayout->columns(1);
?>

columnsWidth

Determines the width of the columns. Numeric values are treated as pixels.

Returns

\Kendo\UI\TileLayout

Parameters

$value string|float

Example - using string

<?php
$tileLayout = new \Kendo\UI\TileLayout('TileLayout');
$tileLayout->columnsWidth('value');
?>

Example - using float

<?php
$tileLayout = new \Kendo\UI\TileLayout('TileLayout');
$tileLayout->columnsWidth(1);
?>

addContainer

Adds one or more TileLayoutContainer to the TileLayout.

Returns

\Kendo\UI\TileLayout

Parameters

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

Example - using \Kendo\UI\TileLayoutContainer

<?php
$tileLayout = new \Kendo\UI\TileLayout('TileLayout');
$container = new \Kendo\UI\TileLayoutContainer();
$colSpan = 1;
$container->colSpan($colSpan);
$tileLayout->addContainer($container);
?>

Example - using array

<?php
$tileLayout = new \Kendo\UI\TileLayout('TileLayout');
$colSpan = 1;
$tileLayout->addContainer(array('colSpan' => $colSpan));
?>

Example - adding more than one TileLayoutContainer

<?php
$tileLayout = new \Kendo\UI\TileLayout('TileLayout');
$first  = new \Kendo\UI\TileLayoutContainer();
$second = new \Kendo\UI\TileLayoutContainer();
$tileLayout->addContainer($first, $second);
?>

gap

An object holding values that determine the spacing between the layout items horizontally and vertically.

Returns

\Kendo\UI\TileLayout

Parameters

$value \Kendo\UI\TileLayoutGap|array

Example - using \Kendo\UI\TileLayoutGap

<?php
$tileLayout = new \Kendo\UI\TileLayout('TileLayout');
$gap = new \Kendo\UI\TileLayoutGap();
$columns = 1;
$gap->columns($columns);
$tileLayout->gap($gap);
?>

Example - using array

<?php
$tileLayout = new \Kendo\UI\TileLayout('TileLayout');
$columns = 1;
$tileLayout->gap(array('columns' => $columns));
?>

height

Determines the height of the layout. Numeric values are treated as pixels.

Returns

\Kendo\UI\TileLayout

Parameters

$value string|float

Example - using string

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

Example - using float

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

A value indicating whether keyboard navigation will be enabled.

Returns

\Kendo\UI\TileLayout

Parameters

$value boolean

Example

<?php
$tileLayout = new \Kendo\UI\TileLayout('TileLayout');
$tileLayout->navigatable(true);
?>

reorder

Fired when a tile item is reordered. For additional information check the reorder event documentation.

Returns

\Kendo\UI\TileLayout

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$tileLayout = new \Kendo\UI\TileLayout('TileLayout');
$tileLayout->reorder('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onReorder(e) {
        // handle the reorder event.
    }
</script>
<?php
$tileLayout = new \Kendo\UI\TileLayout('TileLayout');
$tileLayout->reorder('onReorder');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$tileLayout = new \Kendo\UI\TileLayout('TileLayout');
$tileLayout->reorder(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

reorderable

Determines whether the reordering functionality will be enabled.

Returns

\Kendo\UI\TileLayout

Parameters

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

Example - using boolean

<?php
$tileLayout = new \Kendo\UI\TileLayout('TileLayout');
$tileLayout->reorderable(true);
?>

Example - using \Kendo\UI\TileLayoutReorderable

<?php
$tileLayout = new \Kendo\UI\TileLayout('TileLayout');
$reorderable = new \Kendo\UI\TileLayoutReorderable();
$clickMoveClick = true;
$reorderable->clickMoveClick($clickMoveClick);
$tileLayout->reorderable($reorderable);
?>

Example - using array

<?php
$tileLayout = new \Kendo\UI\TileLayout('TileLayout');
$clickMoveClick = true;
$tileLayout->reorderable(array('clickMoveClick' => $clickMoveClick));
?>

resizable

Determines whether the resizing functionality will be enabled.

Returns

\Kendo\UI\TileLayout

Parameters

$value boolean

Example

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

resize

Fired when a tile item is resized. For additional information check the resize event documentation.

Returns

\Kendo\UI\TileLayout

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

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

Example - using string which defines a JavaScript name

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

Example - using \Kendo\JavaScriptFunction

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

rowsHeight

Determines the height of the rows. Numeric values are treated as pixels.

Returns

\Kendo\UI\TileLayout

Parameters

$value string|float

Example - using string

<?php
$tileLayout = new \Kendo\UI\TileLayout('TileLayout');
$tileLayout->rowsHeight('value');
?>

Example - using float

<?php
$tileLayout = new \Kendo\UI\TileLayout('TileLayout');
$tileLayout->rowsHeight(1);
?>

width

Determines the width of the layout. Numeric values are treated as pixels.

Returns

\Kendo\UI\TileLayout

Parameters

$value string|float

Example - using string

<?php
$tileLayout = new \Kendo\UI\TileLayout('TileLayout');
$tileLayout->width('value');
?>

Example - using float

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