\Kendo\UI\ButtonBadge
A PHP class representing the badge setting of Button.
Methods
align
Specifies alignment of the badge relative to button. Valid position options are: top start, top end, bottom start, bottom end. works in conjunction with badge.position.
Returns
\Kendo\UI\ButtonBadge
Parameters
$value string
Example
<?php
$badge = new \Kendo\UI\ButtonBadge();
$badge->align('value');
?>
cutoutBorder
Specifies wether or not to render additional "cutout" border around the badge.
Returns
\Kendo\UI\ButtonBadge
Parameters
$value boolean
Example
<?php
$badge = new \Kendo\UI\ButtonBadge();
$badge->cutoutBorder(true);
?>
fill
Specifies how theme colors apply to a badge. Valid options are solid (default) and outline.
Returns
\Kendo\UI\ButtonBadge
Parameters
$value string
Example
<?php
$badge = new \Kendo\UI\ButtonBadge();
$badge->fill('value');
?>
icon
Defines the name for an existing icon in a Kendo UI theme or SVG content. The icon is rendered inside the badge by a span.k-icon or span.k-svg-icon element.
Returns
\Kendo\UI\ButtonBadge
Parameters
$value string
Example
<?php
$badge = new \Kendo\UI\ButtonBadge();
$badge->icon('value');
?>
max
If text is a number, it will cap that number.
Returns
\Kendo\UI\ButtonBadge
Parameters
$value float
Example
<?php
$badge = new \Kendo\UI\ButtonBadge();
$badge->max(1);
?>
position
Specifies position of the badge relative to the edge of the button. Valid placemnt options are: inline, edge, inside, outside.Note: position configuration, other than inline, requires the badge to be aligned. See badge.align for more details.
Returns
\Kendo\UI\ButtonBadge
Parameters
$value string
Example
<?php
$badge = new \Kendo\UI\ButtonBadge();
$badge->position('value');
?>
shape
Specifies the shape of the badge. Valid options are: rectangle, rounded, pill, circle, dot.
Returns
\Kendo\UI\ButtonBadge
Parameters
$value string
Example
<?php
$badge = new \Kendo\UI\ButtonBadge();
$badge->shape('value');
?>
size
Specifies the size of the badge. Valid options are small, medium and large.
Returns
\Kendo\UI\ButtonBadge
Parameters
$value string
Example
<?php
$badge = new \Kendo\UI\ButtonBadge();
$badge->size('value');
?>
template
The template which renders the content of the badge.
Returns
\Kendo\UI\ButtonBadge
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string
<?php
$badge = new \Kendo\UI\ButtonBadge();
$badge->template('value');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$badge = new \Kendo\UI\ButtonBadge();
$badge->template(new \Kendo\JavaScriptFunction('function() { }'));
?>
text
The text of the badge. Valid input includes string, number or object with toString method. Default is empty string.
Returns
\Kendo\UI\ButtonBadge
Parameters
$value string|float
Example - using string
<?php
$badge = new \Kendo\UI\ButtonBadge();
$badge->text('value');
?>
Example - using float
<?php
$badge = new \Kendo\UI\ButtonBadge();
$badge->text(1);
?>
themeColor
Specifies the color of the component. Valid options are inherit, default, primary, secondary, tertiary, info, success, warning, error, dark, light, inverted.
Returns
\Kendo\UI\ButtonBadge
Parameters
$value string
Example
<?php
$badge = new \Kendo\UI\ButtonBadge();
$badge->themeColor('value');
?>
visible
If set to false the badge will not be displayed.
Returns
\Kendo\UI\ButtonBadge
Parameters
$value boolean
Example
<?php
$badge = new \Kendo\UI\ButtonBadge();
$badge->visible(true);
?>