Ferreteria/v2/class/fcToggleLink

From Woozle Writes Code
< Ferreteria‎ | v2‎ | class
Jump to navigation Jump to search

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