Generate img tags for registered icons, through global_icon().
This is used by the default callback to replace '$global_icons$'.
void global_icon(
string
$title, string
$icon, string
$url, [integer
$word = ''], [integer
$icon_weight = 3], [array
$word_weight = 2], [
$link_attribs = array( 'class'=>'action_icon' )]
)
|
|
Registers a global action icon
Parameters:
|
string |
$title: |
TITLE text (IMG and A link) |
|
string |
$icon: |
icon code, see $map_iconfiles |
|
string |
$url: |
icon code for get_icon() |
|
integer |
$word: |
1-5: weight of the icon. the icon will be displayed only if its weight is >= than the user setting threshold |
|
integer |
$icon_weight: |
1-5: weight of the word. the word will be displayed only if its weight is >= than the user setting threshold |
|
array |
$word_weight: |
Additional attributes to the A tag. See action_icon(). |
|
|
$link_attribs: |
|
string replace_callback(
array
$matches
)
|
|
Callback function used to replace only necessary values in template.
This gets used by replace_vars() to replace $vars$.
Parameters:
|
array |
$matches: |
preg match. Index 1 is the template variable. |
API Tags:
| Return: | to be substituted |
Redefined in descendants as:
string replace_callback_wrapper(
array
$match
)
|
|
This is an additional wrapper to replace_vars() that allows to react on the return value of it.
Used by replace_callback()
Parameters:
string replace_vars(
string
$template, [array
$replace_params = NULL]
)
|
|
Replaces $vars$ with appropriate values.
You can give an alternative string to display, if the substituted variable is empty, like:
$vars "Display if empty"$
Parameters:
|
string |
$template: |
template |
|
array |
$replace_params: |
optional params that are put into $this->replace_params to be accessible by derived replace_callback() methods |
API Tags:
| Return: | The substituted string |