本文整理汇总了PHP中Chtml::value方法的典型用法代码示例。如果您正苦于以下问题:PHP Chtml::value方法的具体用法?PHP Chtml::value怎么用?PHP Chtml::value使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Chtml
的用法示例。
在下文中一共展示了Chtml::value方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$this->widget('bootstrap.widgets.TbGridView', array('type' => 'striped condensed hover', 'id' => 'id', 'dataProvider' => new CArrayDataProvider($model->projectMentor->projectMeetings, array('keyField' => false)), 'summaryText' => '', 'columns' => array(array('name' => 'id', 'value' => '$data->id', 'header' => 'ID'), array('name' => 'date', 'value' => '$data->date', 'header' => 'Date'), array('name' => 'time', 'value' => '$data->time', 'header' => 'Time'), array('name' => 'menteeUser.user.fname', 'value' => '$data->menteeUser->user->fname . " " . $data->menteeUser->user->lname', 'header' => 'Mentee Name'))));
} else {
if ($model->isProMentor) {
echo 'No meetings as project mentor.';
}
}
if ($model->isPerMentor) {
?>
<hr><h4>Personal Meetings</h4><?php
$this->widget('bootstrap.widgets.TbGridView', array('type' => 'striped condensed hover', 'id' => 'id', 'dataProvider' => new CArrayDataProvider($model->personalMentor->personalMeetings, array('keyField' => false)), 'summaryText' => '', 'columns' => array(array('name' => 'id', 'value' => '$data->id', 'header' => 'ID'), array('name' => 'date', 'value' => '$data->date', 'header' => 'Date'), array('name' => 'time', 'value' => '$data->time', 'header' => 'Time'), array('name' => 'menteefullname', 'value' => '$data->menteeUser->user->fname . " " . $data->menteeUser->user->lname', 'header' => 'Mentee Name'))));
} else {
if ($model->isPerMentor) {
echo 'No meetings as a personal mentor.';
}
}
$exists = Chtml::value($model, 'mentee');
if ($model->isMentee && $exists !== null) {
?>
<h4>Personal Mentor Meetings</h4>
<?php
$this->widget('bootstrap.widgets.TbGridView', array('type' => 'striped condensed hover', 'id' => 'id', 'dataProvider' => new CArrayDataProvider($model->mentee->personalMeetings, array('keyField' => false)), 'summaryText' => '', 'columns' => array(array('name' => 'id', 'value' => '$data->id', 'header' => 'ID'), array('name' => 'date', 'value' => '$data->date', 'header' => 'Date'), array('name' => 'time', 'value' => '$data->time', 'header' => 'Time'), array('name' => 'permentorfullname', 'value' => '$data->personalMentorUser->user->fname . " " . $data->personalMentorUser->user->lname', 'header' => 'Personal Mentor Name'))));
?>
<h4>Project Mentor Meetings</h4><?php
$this->widget('bootstrap.widgets.TbGridView', array('type' => 'striped condensed hover', 'id' => 'id', 'dataProvider' => new CArrayDataProvider($model->mentee->projectMeetings, array('keyField' => false)), 'summaryText' => '', 'columns' => array(array('name' => 'id', 'value' => '$data->id', 'header' => 'ID'), array('name' => 'date', 'value' => '$data->date', 'header' => 'Date'), array('name' => 'time', 'value' => '$data->time', 'header' => 'Time'), array('name' => 'projmentorfullname', 'value' => '$data->projectMentorUser->user->fname . " " . $data->projectMentorUser->user->lname', 'header' => 'Project Mentor Name'))));
} else {
if ($model->isMentee) {
echo 'No meetings as mentee.';
}
}
?>
</div>