Jet\UI_icon
Icon Renderer. It inherits from Jet\UI_Renderer_Single.
The default implementation of view uses Font Awesome fonts, but of course even that is not fixed.
Sizes
The icons must of course have some size. They can be interpreted in the view in any way, but it is important to keep the consistency of the UI. You can define your own size, the predefined ones are as follows.
Constanta | Value |
---|---|
UI_icon::SIZE_EXTRA_SMALL | xs |
UI_icon::SIZE_SMALL | sm |
UI_icon::SIZE_NORMAL | normal |
UI_icon::SIZE_LARGE | lg |
UI_icon::SIZE_EXTRA_LARGE | xl |
UI_icon::SIZE_ULTRA_LARGE | ul |
Overview of methods
Method | Meaning of |
---|---|
public __construct( string $icon ) |
The parameter is the name of the icon from the given icon set. |
public getIcon( ) : string |
Returns the set icon name. |
public setSize( string $size ) : static |
Sets the icon size. |
public getSize( ) : string |
Returns the set icon size. |
public setTitle( string $title ) : static |
Sets the icon caption. |
public getTitle( ) : string |
Returns the set icon caption. |
public setTag( string $tag ) : static |
Determines what HTML tag will make up the icon, if it should be other than the default HTML tag (span). |
public getTag( ) : string |
Returns what HTML tag should make up the icon. |