Ferreteria/v2/class/fcToggleLink: Difference between revisions

From Woozle Writes Code
< 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...")
 
m (2 revisions imported: moving this project here)
 
(One intermediate revision by one other user not shown)
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>
* '''file''': {{l/ferreteria/file|menu/items.php}}
* '''extends''': {{l/version|class|fcDynamicLink}}

Latest revision as of 16:45, 22 May 2022

Template:Page/code/class

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;
    }
}