\Kendo\UI\Avatar
A PHP wrapper for Kendo UI Avatar.
Inherits from \Kendo\UI\Widget.
Usage
To use Avatar 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 Avatar
<?php
// Create a new instance of Avatar and specify its id
$avatar = new \Kendo\UI\Avatar('Avatar');
// Configure it
$avatar->alt('value')
// Output it
echo $avatar->render();
?>
Methods
alt
A text description of the Avatar image. When type="image" is configured this value will be used to populate the alt attribute of the element.
Returns
\Kendo\UI\Avatar
Parameters
$value string
Example
<?php
$avatar = new \Kendo\UI\Avatar('Avatar');
$avatar->alt('value');
?>
border
Specifies whether the avatar should render border around its container element. Default is false.
Returns
\Kendo\UI\Avatar
Parameters
$value boolean
Example
<?php
$avatar = new \Kendo\UI\Avatar('Avatar');
$avatar->border(true);
?>
className
Adds additional custom classes to the Avatar container element.
Returns
\Kendo\UI\Avatar
Parameters
$value string
Example
<?php
$avatar = new \Kendo\UI\Avatar('Avatar');
$avatar->className('value');
?>
fillMode
Specifies the appearance fill style of the Avatar. The available values are "outline", "solid" (default), and null.
Returns
\Kendo\UI\Avatar
Parameters
$value string
Example
<?php
$avatar = new \Kendo\UI\Avatar('Avatar');
$avatar->fillMode('value');
?>
icon
Specifies an icon name to be used if the avatar type is set to icon. For a list of available icon names, please refer to the Web Font Icons article.
Returns
\Kendo\UI\Avatar
Parameters
$value string
Example
<?php
$avatar = new \Kendo\UI\Avatar('Avatar');
$avatar->icon('value');
?>
image
Specifies an image URL or dataURL that would be used to populate the src attribute of the avatar element.
Returns
\Kendo\UI\Avatar
Parameters
$value string
Example
<?php
$avatar = new \Kendo\UI\Avatar('Avatar');
$avatar->image('value');
?>
rounded
Could be one of the predefined shapes available for the widget container: "full" (default), "small", "medium", "large", or null.
Returns
\Kendo\UI\Avatar
Parameters
$value string
Example
<?php
$avatar = new \Kendo\UI\Avatar('Avatar');
$avatar->rounded('value');
?>
size
The Avatar allows you to set predefined sizes. The available size values are "small", "medium" (default), "large", or null.
Returns
\Kendo\UI\Avatar
Parameters
$value string
Example
<?php
$avatar = new \Kendo\UI\Avatar('Avatar');
$avatar->size('value');
?>
style
Sets additional CSS styles to the Avatar container element.
Returns
\Kendo\UI\Avatar
Parameters
$value ``
text
Will be used to populated Avatar content when its type is set to text
Returns
\Kendo\UI\Avatar
Parameters
$value string
Example
<?php
$avatar = new \Kendo\UI\Avatar('Avatar');
$avatar->text('value');
?>
themeColor
The Avatar allows you to specify predefined theme colors for background of its container. The available themeColor values are: - primary (Default) - Applies coloring based on primary theme color. - base - Applies base theme color. - secondary - Applies coloring based on secondary theme color. - tertiary - Applies coloring based on tertiary theme color. - inherit - Applies inherited coloring value. - info - Applies coloring based on info theme color. - success - Applies coloring based on success theme color. - warning - Applies coloring based on warning theme color. - error - Applies coloring based on error theme color. - dark - Applies coloring based on dark theme color. - light - Applies coloring based on light theme color. - inverse - Applies coloring based on inverted theme color. - null - Does not apply theme color class.
Returns
\Kendo\UI\Avatar
Parameters
$value string
Example
<?php
$avatar = new \Kendo\UI\Avatar('Avatar');
$avatar->themeColor('value');
?>
type
Could be one of the three predefined types for the widget: icon, image, or text (default).
Returns
\Kendo\UI\Avatar
Parameters
$value string
Example
<?php
$avatar = new \Kendo\UI\Avatar('Avatar');
$avatar->type('value');
?>