本文整理汇总了PHP中URLHelper::makeUrlGenre方法的典型用法代码示例。如果您正苦于以下问题:PHP URLHelper::makeUrlGenre方法的具体用法?PHP URLHelper::makeUrlGenre怎么用?PHP URLHelper::makeUrlGenre使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类URLHelper
的用法示例。
在下文中一共展示了URLHelper::makeUrlGenre方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
echo Yii::app()->createUrl("{$route}", array('id' => $c, 's' => 'VIDEO'));
?>
"><?php
echo Yii::t('wap', 'Video');
?>
</a></li>
<?php
} else {
?>
<li><a href="<?php
echo URLHelper::makeUrlGenre(array("type" => $type, 'name' => $name, 'id' => $c, 'gt' => 'new'));
?>
"><?php
echo Yii::t('wap', 'New');
?>
</a></li>
<li><a href="<?php
echo URLHelper::makeUrlGenre(array("type" => $type, 'name' => $name, 'id' => $c, 'gt' => 'hot'));
?>
"><?php
echo Yii::t('wap', 'Hot');
?>
</a></li>
<?php
}
?>
</ul>
</div>
</div>
</div>
示例2: createPageUrlSeo
private function createPageUrlSeo($pageNumber = 0)
{
$link = "#";
if (!empty($this->suffix) && !empty($this->object_link)) {
$object = $this->object_link;
if ($pageNumber > 0) {
$object['other']['p'] = $pageNumber + 1;
}
switch ($this->suffix) {
case 'gr':
//genre
$link = URLHelper::makeUrlGenre($object);
break;
case 'at':
//genre
//genre
case 'ai':
//artist_list
$link = URLHelper::makeUrlMultiLevel($object);
break;
}
} else {
$link = Yii::app()->request->requestUri;
preg_match("/p=(\\w+)/", $link, $match);
if ($match) {
if (!empty($match[0])) {
if ($pageNumber > 0) {
$p = $pageNumber + 1;
$link = str_replace($match[0], 'p=' . $p, $link);
} else {
$link = str_replace(array('?' . $match[0], '&' . $match[0]), '', $link);
}
}
} else {
if ($pageNumber > 0) {
$p = $pageNumber + 1;
if (strpos($link, '?') !== false) {
$link .= "&p=" . $p;
} else {
$link .= "?p=" . $p;
}
}
}
}
return $link;
}
示例3: array
<div class="block_list clb">
<div class="fontB bl_title">
<a href="<?php
echo Yii::app()->createUrl("genre/index", array("type" => $type));
?>
"><?php
echo mb_strtoupper('Thể loại', 'UTF-8');
?>
</a>
</div>
<div class="bl_item">
<table class="genretb">
<?php
$i = 0;
foreach ($genres as $genre) {
$genreLink = URLHelper::makeUrlGenre(array("type" => $type, 'name' => $genre->name, 'id' => $genre->id));
/*if($genre->parent_id == 0)
$genreLink = Yii::app()->homeUrl. 'genre#'.$genre->id;*/
if ($i % 2 == 0) {
echo '<tr>';
}
$hot = $new = '';
$baseUrl = Yii::app()->request->baseUrl;
if ($genre->is_hot) {
$hot = "<img style='margin-left: 6px;' src='" . $baseUrl . "/wap/images/hot.gif' />";
}
if ($genre->is_new) {
$new = "<img style='margin-left: 6px;' src='" . $baseUrl . "/wap/images/new.gif' />";
}
?>
<td class="wid50">