\Kendo\UI\Breadcrumb

A PHP wrapper for Kendo UI Breadcrumb.

Inherits from \Kendo\UI\Widget.

Usage

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

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

// Configure it
$breadcrumb->bindToLocation(true)

// Output it

echo $breadcrumb->render();
?>

Methods

bindToLocation

Indicates whether the Breadcrumb will enable/disable the binding to the location object of the browser on initialization.

Returns

\Kendo\UI\Breadcrumb

Parameters

$value boolean

Example

<?php
$breadcrumb = new \Kendo\UI\Breadcrumb('Breadcrumb');
$breadcrumb->bindToLocation(true);
?>

change

Fires when the value of the Breadcrumb is changed. For additional information check the change event documentation.

Returns

\Kendo\UI\Breadcrumb

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$breadcrumb = new \Kendo\UI\Breadcrumb('Breadcrumb');
$breadcrumb->change('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onChange(e) {
        // handle the change event.
    }
</script>
<?php
$breadcrumb = new \Kendo\UI\Breadcrumb('Breadcrumb');
$breadcrumb->change('onChange');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$breadcrumb = new \Kendo\UI\Breadcrumb('Breadcrumb');
$breadcrumb->change(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

click

Fires when an item or a rootitem is clicked. For additional information check the click event documentation.

Returns

\Kendo\UI\Breadcrumb

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$breadcrumb = new \Kendo\UI\Breadcrumb('Breadcrumb');
$breadcrumb->click('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onClick(e) {
        // handle the click event.
    }
</script>
<?php
$breadcrumb = new \Kendo\UI\Breadcrumb('Breadcrumb');
$breadcrumb->click('onClick');
?>

Example - using \Kendo\JavaScriptFunction

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

delimiterIcon

Defines a name of an existing icon in the Kendo UI Web Font Icons. The icon will be applied as separator between the segments of the Breadcrumb path.

Returns

\Kendo\UI\Breadcrumb

Parameters

$value string

Example

<?php
$breadcrumb = new \Kendo\UI\Breadcrumb('Breadcrumb');
$breadcrumb->delimiterIcon('value');
?>

editable

Indicates whether the editing functionality of the Breadcrumb will be enabled/disabled.If the option is enabled the path will be editable. Clicking in an empty area of the component will trigger editing mode. Editing mode shows an input showing the value of the component enabling the end user to type a new path.

Returns

\Kendo\UI\Breadcrumb

Parameters

$value boolean

Example

<?php
$breadcrumb = new \Kendo\UI\Breadcrumb('Breadcrumb');
$breadcrumb->editable(true);
?>

gap

Defines the space in pixels after the last item to stay empty.The gap value is taken into account when items overflow and continues to remain empty.

Returns

\Kendo\UI\Breadcrumb

Parameters

$value float

Example

<?php
$breadcrumb = new \Kendo\UI\Breadcrumb('Breadcrumb');
$breadcrumb->gap(1);
?>

addItem

Adds one or more BreadcrumbItem to the Breadcrumb.

Returns

\Kendo\UI\Breadcrumb

Parameters

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

Example - using \Kendo\UI\BreadcrumbItem

<?php
$breadcrumb = new \Kendo\UI\Breadcrumb('Breadcrumb');
$item = new \Kendo\UI\BreadcrumbItem();
$href = 'value';
$item->href($href);
$breadcrumb->addItem($item);
?>

Example - using array

<?php
$breadcrumb = new \Kendo\UI\Breadcrumb('Breadcrumb');
$href = 'value';
$breadcrumb->addItem(array('href' => $href));
?>

Example - adding more than one BreadcrumbItem

<?php
$breadcrumb = new \Kendo\UI\Breadcrumb('Breadcrumb');
$first  = new \Kendo\UI\BreadcrumbItem();
$second = new \Kendo\UI\BreadcrumbItem();
$breadcrumb->addItem($first, $second);
?>

messages

Defines the text of the root icon title that is displayed within the Breadcrumb.

Returns

\Kendo\UI\Breadcrumb

Parameters

$value \Kendo\UI\BreadcrumbMessages|array

Example - using \Kendo\UI\BreadcrumbMessages

<?php
$breadcrumb = new \Kendo\UI\Breadcrumb('Breadcrumb');
$messages = new \Kendo\UI\BreadcrumbMessages();
$rootTitle = 'value';
$messages->rootTitle($rootTitle);
$breadcrumb->messages($messages);
?>

Example - using array

<?php
$breadcrumb = new \Kendo\UI\Breadcrumb('Breadcrumb');
$rootTitle = 'value';
$breadcrumb->messages(array('rootTitle' => $rootTitle));
?>

Indicates whether the navigation functionality of the Breadcrumb will be enabled/disabled.When navigational is set to false, automatic navigation (changing url location) is disabled by default. In this state, the click event will be prevented and navigation will occur only if programmatic navigation is implemented.When navigational is set to true, the url (path) will be automatically added to the href attribute of the rendered links. In this state, the click event will trigger navigation.

Returns

\Kendo\UI\Breadcrumb

Parameters

$value boolean

Example

<?php
$breadcrumb = new \Kendo\UI\Breadcrumb('Breadcrumb');
$breadcrumb->navigational(true);
?>

rootIcon

Defines a name of an existing icon in the Kendo UI Web Font Icons. The icon will be applied as the first item(root) of Breadcrumb path.The root icon is clickable and resets the value of the component.

Returns

\Kendo\UI\Breadcrumb

Parameters

$value string

Example

<?php
$breadcrumb = new \Kendo\UI\Breadcrumb('Breadcrumb');
$breadcrumb->rootIcon('value');
?>

value

Defines the value/path of the component. Each segments is separated by a slash.

Returns

\Kendo\UI\Breadcrumb

Parameters

$value string

Example

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