本文整理汇总了PHP中Y::url方法的典型用法代码示例。如果您正苦于以下问题:PHP Y::url方法的具体用法?PHP Y::url怎么用?PHP Y::url使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Y
的用法示例。
在下文中一共展示了Y::url方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createPageUrl
public function createPageUrl($controller,$page)
{
$params=$this->params===null ? $_GET : $this->params;
if($page>0) // page 0 is the default
$params[$this->pageVar]=$page+1;
else
unset($params[$this->pageVar]);
return Y::url($this->route,$params);
}
示例2: renderFilter
public function renderFilter()
{
$filter = isset($_GET['filter']) ? $_GET['filter'] : null;
$details = isset($_GET['filterDetails']) ? $_GET['filterDetails'] : '';
if(isset($_GET['filterButton']))
unset($_GET['filterButton']);
$tmpGet = $_GET;
if (isset($tmpGet['filter'])) {
if (isset($tmpGet['filterDetails']))
unset($tmpGet['filterDetails']);
unset($tmpGet['filter']);
}
echo CHtml::form( Y::url('site', $tmpGet), 'get');
echo CHtml::dropDownList('filter',$filter,array(
'inYear'=>'по годам', 'inWorkType'=>'по видам деятельности','inCity'=>'по городам'
));
if ($filter) {
if ($filter == 'inYear')
$items = Y::years();
if ($filter == 'inCity')
$items = City::model()->allWithHeader;
if ($filter == 'inWorkType')
$items = PortfolioWorkType::model()->allWithHeader;
if (isset($items))
echo CHtml::dropDownList('filterDetails', $details, $items);
}
echo CHtml::submitButton('Отфильтровать', array('name'=>'filterButton'));
echo CHtml::endForm();
}
示例3: getUpdateUrl
public function getUpdateUrl()
{
return Y::url(Y::module()->getId().'/records/update', array('pk' => $this->pk, 'catPk'=>$this->category->pk));
}
示例4: url
public function url($url, $params = array())
{
return Y::url('users/'.$url, $params);
}
示例5: url
public static function url($url, $params = array())
{
return Y::url('/admin/'.$url, $params);
}
示例6: getUrl
public function getUrl()
{
$urlParmas = $this->is_empty ? $this->children[0]->urlParams : $this->urlParams;
return Y::url('site', $urlParmas);
}