本文整理汇总了PHP中Banner::getClickUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP Banner::getClickUrl方法的具体用法?PHP Banner::getClickUrl怎么用?PHP Banner::getClickUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Banner
的用法示例。
在下文中一共展示了Banner::getClickUrl方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getImageBanner
protected function getImageBanner(Banner $banner, $width = null, $height = null)
{
$clickUrl = $banner->getClickUrl();
$htmlOptions = array("class" => 'thumbnail');
if ($width != null) {
$htmlOptions['width'] = $width;
}
if ($height != null) {
$htmlOptions['height'] = $height;
}
$htmlOptions = array('width' => $width, 'height' => $height);
$code = CHtml::image($banner->getShowUrl(), $banner->alt, $htmlOptions);
$code .= CHtml::openTag("div", array("class" => 'caption')) . CHtml::tag("h5", array(), $banner->alt, true) . CHtml::closeTag("div");
if (($link = $banner->link) != null && $link != 'http://') {
$link = "#";
}
$code = CHtml::link($code, $clickUrl, array('title' => $banner->alt, 'class' => 'thumbnails'));
return $code;
}
示例2: getImageBanner
protected function getImageBanner(Banner $banner, $width = null, $height = null)
{
$clickUrl = $banner->getClickUrl();
$htmlOptions = array();
if ($width != null) {
$htmlOptions['width'] = $width;
}
if ($height != null) {
$htmlOptions['height'] = $height;
}
$htmlOptions = array('width' => $width, 'height' => $height);
$code = CHtml::image($banner->getShowUrl(), $banner->alt, $htmlOptions);
if (($link = $banner->link) != null && $link != 'http://') {
$code = CHtml::link($code, $clickUrl, array('title' => $banner->alt));
}
return $code;
}