コード例 #1
0
 private function constructPanelUrl($canvas, $hrefClass)
 {
     $uParam = new OpfUrlParam();
     $uParam->appendAllCurrentParameters(0, 0);
     $uParam->removeKey(OpfConfig::PARAM_CMDLEVEL4);
     $uParam->removeKey(OpfConfig::PARAM_CMDLEVEL3);
     $uParam->removeKey(OpfConfig::PARAM_CMDLEVEL2);
     $uParam->appendKeyValuePair($this->canvasParamName, $canvas->getTag());
     $ds = $this->getDataSource();
     $icon = $ds->renderImg($canvas->getIcon(), $canvas->getLabel());
     $label = $icon . $canvas->getLabel();
     $str = $ds->renderHrefInString($ds->getCurrentPageName(), $uParam->toString(), $label, $hrefClass);
     return $str;
 }
コード例 #2
0
 protected function constructNavigationUrl($canvas, $selected)
 {
     $ds = $this->getDataSource();
     $uParam = new OpfUrlParam();
     $uParam->appendAllCurrentParameters(0, 0);
     $uParam->removeKey(OpfConfig::PARAM_CMDLEVEL4);
     $uParam->removeKey(OpfConfig::PARAM_CMDLEVEL3);
     $uParam->removeKey(OpfConfig::PARAM_CMDLEVEL2);
     $uParam->appendKeyValuePair($this->canvasParamName, $canvas->getTag());
     $label = $canvas->getLabel();
     $canvasLink = $this->renderIcon($canvas->getIcon(), $label);
     /* bold means selected */
     if ($selected) {
         $canvasLink .= '<b>';
     }
     // if
     $canvasLink .= ucwords($label);
     if ($selected) {
         $canvasLink .= '</b>';
     }
     // if
     return $ds->renderHrefInString($ds->getMyPageName(), $uParam->toString(), $canvasLink);
 }