New to Telerik UI for PHP? Download free 30-day trial

\Kendo\UI\FloatingActionButton

A PHP wrapper for Kendo UI FloatingActionButton.

Inherits from \Kendo\UI\Widget.

Usage

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

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

// Configure it
$floatingActionButton->align('value')

// Output it

echo $floatingActionButton->render();
?>

Methods

align

Specifies position of the FloatingActionButton relative to its container. Valid position options are: top start: positions the button at top left corner of the container.; top center: positions the button at top center of the container.; top end: positions the button at top right corner of the container.; middle start: positions the button at middle left of the container.; middle end: positions the button at middle right of the container.; bottom start: positions the button at bottom left corner of the container.; bottom center: positions the button at top center of the container. or bottom end: positions the button at bottom right corner of the container.. works in conjunction with positionMode and alignOffset.**Note: when using align, make sure the FloatingActionButton container has css position other than static and allows overflow content.

Returns

\Kendo\UI\FloatingActionButton

Parameters

$value string

Example

<?php
$floatingActionButton = new \Kendo\UI\FloatingActionButton('FloatingActionButton');
$floatingActionButton->align('value');
?>

alignOffset

Specifies the horizontal and vertical offset of the FloatingActionButton.

Returns

\Kendo\UI\FloatingActionButton

Parameters

$value \Kendo\UI\FloatingActionButtonAlignOffset|array

Example - using \Kendo\UI\FloatingActionButtonAlignOffset

<?php
$floatingActionButton = new \Kendo\UI\FloatingActionButton('FloatingActionButton');
$alignOffset = new \Kendo\UI\FloatingActionButtonAlignOffset();
$x = 1;
$alignOffset->x($x);
$floatingActionButton->alignOffset($alignOffset);
?>

Example - using array

<?php
$floatingActionButton = new \Kendo\UI\FloatingActionButton('FloatingActionButton');
$x = 1;
$floatingActionButton->alignOffset(array('x' => $x));
?>

click

Fires when the user clicks on a the FloatingActionButton.**Note: when using items configuration, clicking on the FloatingActionButton will open the speed-dial list popup. For additional information check the click event documentation.

Returns

\Kendo\UI\FloatingActionButton

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

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

Example - using string which defines a JavaScript name

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

Example - using \Kendo\JavaScriptFunction

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

collapse

Fires when the speed-dial popup is closed and its animation is finished.**Note: this event is triggered only when using items configuration. For additional information check the collapse event documentation.

Returns

\Kendo\UI\FloatingActionButton

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$floatingActionButton = new \Kendo\UI\FloatingActionButton('FloatingActionButton');
$floatingActionButton->collapse('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onCollapse(e) {
        // handle the collapse event.
    }
</script>
<?php
$floatingActionButton = new \Kendo\UI\FloatingActionButton('FloatingActionButton');
$floatingActionButton->collapse('onCollapse');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$floatingActionButton = new \Kendo\UI\FloatingActionButton('FloatingActionButton');
$floatingActionButton->collapse(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

enabled

Specifies whether the FloatingActionButton is enabled (true) or disabled (false).

Returns

\Kendo\UI\FloatingActionButton

Parameters

$value boolean

Example

<?php
$floatingActionButton = new \Kendo\UI\FloatingActionButton('FloatingActionButton');
$floatingActionButton->enabled(true);
?>

expand

Fires when the speed-dial popup is opened and its animation is finished.**Note: this event is triggered only when using items configuration. For additional information check the expand event documentation.

Returns

\Kendo\UI\FloatingActionButton

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$floatingActionButton = new \Kendo\UI\FloatingActionButton('FloatingActionButton');
$floatingActionButton->expand('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onExpand(e) {
        // handle the expand event.
    }
</script>
<?php
$floatingActionButton = new \Kendo\UI\FloatingActionButton('FloatingActionButton');
$floatingActionButton->expand('onExpand');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$floatingActionButton = new \Kendo\UI\FloatingActionButton('FloatingActionButton');
$floatingActionButton->expand(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

icon

Specifies the name for an existing icon in a Kendo UI theme that is rendered in the FloatingActionButton.See the Web Font Icons help article for more details on Kendo UI icons.

Returns

\Kendo\UI\FloatingActionButton

Parameters

$value string

Example

<?php
$floatingActionButton = new \Kendo\UI\FloatingActionButton('FloatingActionButton');
$floatingActionButton->icon('value');
?>

addItem

Adds one or more FloatingActionButtonItem to the FloatingActionButton.

Returns

\Kendo\UI\FloatingActionButton

Parameters

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

Example - using \Kendo\UI\FloatingActionButtonItem

<?php
$floatingActionButton = new \Kendo\UI\FloatingActionButton('FloatingActionButton');
$item = new \Kendo\UI\FloatingActionButtonItem();
$cssClass = 'value';
$item->cssClass($cssClass);
$floatingActionButton->addItem($item);
?>

Example - using array

<?php
$floatingActionButton = new \Kendo\UI\FloatingActionButton('FloatingActionButton');
$cssClass = 'value';
$floatingActionButton->addItem(array('cssClass' => $cssClass));
?>

Example - adding more than one FloatingActionButtonItem

<?php
$floatingActionButton = new \Kendo\UI\FloatingActionButton('FloatingActionButton');
$first  = new \Kendo\UI\FloatingActionButtonItem();
$second = new \Kendo\UI\FloatingActionButtonItem();
$floatingActionButton->addItem($first, $second);
?>

positionMode

Defines the type of positioning

Returns

\Kendo\UI\FloatingActionButton

Parameters

$value string

Example

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

shape

Specifies the shape of the component

Returns

\Kendo\UI\FloatingActionButton

Parameters

$value string

Example

<?php
$floatingActionButton = new \Kendo\UI\FloatingActionButton('FloatingActionButton');
$floatingActionButton->shape('value');
?>

size

Specifies the size of the component

Returns

\Kendo\UI\FloatingActionButton

Parameters

$value string

Example

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

text

Specifies the text of the FloatingActionButton. Default is empty string.

Returns

\Kendo\UI\FloatingActionButton

Parameters

$value string

Example

<?php
$floatingActionButton = new \Kendo\UI\FloatingActionButton('FloatingActionButton');
$floatingActionButton->text('value');
?>

themeColor

Specifies the color of the component

Returns

\Kendo\UI\FloatingActionButton

Parameters

$value string

Example

<?php
$floatingActionButton = new \Kendo\UI\FloatingActionButton('FloatingActionButton');
$floatingActionButton->themeColor('value');
?>

visible

Specifies if the FloatingActionButton is visible initially.

Returns

\Kendo\UI\FloatingActionButton

Parameters

$value boolean

Example

<?php
$floatingActionButton = new \Kendo\UI\FloatingActionButton('FloatingActionButton');
$floatingActionButton->visible(true);
?>
In this article
Not finding the help you need?