Yioop_V9.5_Source_Code_Documentation

IconlinkHelper extends Helper
in package

This is a helper class is used to draw icon buttons and links

Tags
author

Chris Pollett

Table of Contents

$icon_possibilities  : array<string|int, mixed>
Types of icons supported by this helper
__construct()  : mixed
Initials mapping between names of icons and the actual icons to be used as links or buttons
renderButton()  : mixed
Draws a link button suitable to indicate the activity $type
renderFormButton()  : mixed
Draws a button for a form that uses an icon as its main text
renderLink()  : mixed
Draws a link suitable to indicate the activity $type

Properties

$icon_possibilities

Types of icons supported by this helper

public array<string|int, mixed> $icon_possibilities

Methods

__construct()

Initials mapping between names of icons and the actual icons to be used as links or buttons

public __construct() : mixed
Return values
mixed

renderButton()

Draws a link button suitable to indicate the activity $type

public renderButton(string $url[, string $type = "edit" ][, string $badge_text = "" ][, bool $as_string = false ][, string $div_classes = "" ][, string $anchor_classes = "" ][, bool $replace_css = false ][, string $tab_target = "" ]) : mixed
Parameters
$url : string

url that is sent when one clicks and confirms

$type : string = "edit"

one of "edit", ...

$badge_text : string = ""

if not empty, text to use to draw a badge on the top right of the icon

$as_string : bool = false

whether to return a string or html

$div_classes : string = ""

space separated, additional css classes to add to outermost div

$anchor_classes : string = ""

space separated, additional css classes to add to anchor tag

$replace_css : bool = false

whether to appened css in $div_classes and $anchor_classes to existing or to replace.

$tab_target : string = ""

whether to open link in a new tab with target $tab_target

Return values
mixed

either void, or a string of html if $as_string = true

renderFormButton()

Draws a button for a form that uses an icon as its main text

public renderFormButton([mixed $button_type = "submit" ][, string $type = "edit" ][, bool $as_string = false ][, mixed $anchor_classes = "" ][, string $additional_attibutes = "" ]) : mixed
Parameters
$button_type : mixed = "submit"
$type : string = "edit"

of icon one of "edit", ...

$as_string : bool = false

whether to return a string or html

$anchor_classes : mixed = ""
$additional_attibutes : string = ""

a string to enclose with the open button tag with additional attributes

Return values
mixed

either void, or a string of html if $as_string = true

Draws a link suitable to indicate the activity $type

public renderLink(string $url[, string $type = "edit" ][, string $badge_text = "" ][, bool $as_string = false ][, mixed $anchor_classes = "" ][, bool $replace_css = false ][, string $tab_target = "" ]) : mixed
Parameters
$url : string

url that is sent when one clicks and confirms

$type : string = "edit"

one of "edit", ...

$badge_text : string = ""

if not empty, text to use to draw a badge on the top right of the icon

$as_string : bool = false

whether to return a string or html

$anchor_classes : mixed = ""
$replace_css : bool = false

whether to replace default anchor css or append to it

$tab_target : string = ""

whether to open link in a new tab with target $tab_target

Return values
mixed

either void, or a string of html if $as_string = true


        

Search results