Ferreteria/v0.4/class/fcMenuOptionLink
< Ferreteria | v0.4 | class
Jump to navigation
Jump to search
- file: Template:L/ferreteria/file
- extends: Template:L/version
- extender: Template:L/version
Usage
Objects are constructed with a single array argument:
array['base'] | = base URL to prefix all output URLs |
array['kname'] | = name of option group to which this option belongs |
array['kval'] (NEW) | = value of unique key |
array['value'] | = default for [text-on] and [text-off] |
array['text-on'] | = (optional) text to display when toggle is on; defaults to [text-off] |
array['text-off'] | = (optional) text to display when toggle is off; defaults to [value] |
array['popup'] | = (optional) hover-over text |
Example - simple [edit]
link in a linkable row:
$oMenu = fcApp::Me()->GetHeaderMenu();
$ol = new fcMenuOptionLink(
array(
'base' => $this->SelfURL(), // base URL to prefix all output URLs
'kname' => 'do', // name of option group to which this option belongs
'kval' => 'edit', // value of unique key
'value' => 'edit', // default for [text-on] and [text-off]
'text-on' => 'edit', // (optional) text to display when toggle is on; defaults to [text-off]
'text-off' => 'edit', // (optional) text to display when toggle is off; defaults to [value]
'popup' => 'edit this account' // (optional) hover-over text
)
);
$oMenu->SetNode($ol);