本文整理汇总了PHP中Label::makeValue方法的典型用法代码示例。如果您正苦于以下问题:PHP Label::makeValue方法的具体用法?PHP Label::makeValue怎么用?PHP Label::makeValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Label
的用法示例。
在下文中一共展示了Label::makeValue方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Post
public function Post($data, $row = '')
{
$author = $data->authors != null ? " <label class='label'>author</label> " . ucfirst($data->authors->username) : '';
$editor = $data->editors != null ? " <label class='label'>editor</label> " . ucfirst($data->editors->username) : '';
$photometa = count($data->photometa) > 0 ? " <small class='muted'>(" . count($data->photometa) . " Photos)</small>" : '';
$val = "<b>" . $data->post_name . "</b>{$photometa}<br>";
$val .= "<small class='muted'>Last Update :" . Helper::convert('D, j-m-Y H:i', $data->post_modified) . "<br>";
$val .= $author . $editor . " - views : " . $data->post_hits . "<br>";
$val .= Topic::makeValue($data, $row) != '' ? '<b>Topic : </b> ' . Topic::makeValue($data, $row) : '';
$val .= Tag::makeValue($data, $row) != '' ? '<b>Tag : </b> ' . Tag::makeValue($data, $row) : '';
$val .= Label::makeValue($data, $row) != '' ? '<b>Label : </b> ' . Label::makeValue($data, $row) : '' . "</small>";
return $val;
}
示例2: array
<?php
$this->breadcumbs();
?>
<h3>Lihat : <?php
echo $model->post_name;
?>
</h3>
<?php
$this->alert();
$webUrl = Yii::app()->FrontUrl->createUrl('/single/index/', array('id' => $model->ID, 'slug' => $model->post_link));
$mobileUrl = Yii::app()->FrontMobileUrl->createUrl('/single/index/', array('id' => $model->ID, 'slug' => $model->post_link));
$link = "Web Url : " . $webUrl . " - " . CHtml::Link('Go to Link', $webUrl) . "<br>";
$link .= frontendMobileUrl == '' ? "" : "Mobile url : " . $mobileUrl . " - " . CHtml::Link('Go to Link', $mobileUrl);
$this->widget('bootstrap.widgets.TbDetailView', array('data' => $model, 'attributes' => array('ID', 'post_name', 'post_title', array('name' => 'post_link', 'type' => 'raw', 'value' => $link), array('name' => 'post_image', 'type' => 'raw', 'value' => CHtml::image(Helper::getThumb('content', $model->post_image, 'medium'))), 'post_image_by', 'post_image_credit', 'post_excerpt', array('name' => 'post_content', 'type' => 'raw'), 'post_source', 'post_source_link', array('name' => 'post_status', 'type' => 'raw', 'value' => array($this, 'Status')), array('label' => 'Author', 'name' => 'authors.username'), array('label' => 'Editor', 'name' => 'editors.username'), array('name' => 'tags.name', 'type' => 'raw', 'value' => Tag::makeValue($model)), array('label' => 'Category', 'type' => 'raw', 'value' => Category::makeValue($model)), array('name' => 'labels.name', 'type' => 'raw', 'value' => Label::makeValue($model)), array('label' => 'Topic', 'type' => 'raw', 'value' => Topic::makeValue($model)), 'post_created', 'post_modified', 'post_meta_key', 'post_meta_desc')));