コード例 #1
0
 /**
  * Appends a VG-style parameter to an Url object
  *
  * VG-style means:
  * {<vgIncrementNumber>,(<key>=)<value>}(,...) 
  * @param \Cx\Core\Routing\Url $url Url object to apply params to
  * @param int $vgId ID of the VG for the parameter
  * @param string $name Parameter name
  * @param string $value Parameter value
  */
 protected static function appendVgParam($url, $vgId, $name, $value)
 {
     $params = $url->getParamArray();
     $pre = '';
     if (isset($params[$name])) {
         $pre = $params[$name];
     }
     if (!empty($pre)) {
         $pre .= ',';
     }
     $url->setParam($name, $pre . '{' . $vgId . ',' . $value . '}');
 }