Ferreteria/v2/class/fcToggleLink: Difference between revisions
< Ferreteria | v2 | class
Jump to navigation
Jump to search
(Created page with "{{page/code/class}} <source lang=php> class fcToggleLink extends fcDynamicLink { /*---- OVERRIDE - removes self from the URL when selected, so that clicking again un...") |
No edit summary |
||
Line 1: | Line 1: | ||
{{page/code/class}} | {{page/code/class}} | ||
* '''file''': {{l/ferreteria/file|menu/items.php}} | |||
* '''extends''': {{l/version|class|fcDynamicLink}} | |||
<source lang=php> | <source lang=php> | ||
class fcToggleLink extends fcDynamicLink { | class fcToggleLink extends fcDynamicLink { | ||
Line 15: | Line 17: | ||
} | } | ||
}</source> | }</source> | ||
Revision as of 17:12, 19 January 2019
- file: Template:L/ferreteria/file
- extends: Template:L/version
class fcToggleLink extends fcDynamicLink {
/*----
OVERRIDE - removes self from the URL when selected, so that clicking again un-toggles state
*/
protected function GetLinkArray_figured() {
$isSel = $this->GetIsSelected();
if ($isSel) {
$arPath = array();
} else {
$arPath = $this->GetLinkArray_self();
}
return $arPath;
}
}