当前位置: 首页>>代码示例>>PHP>>正文


PHP Chtml::value方法代码示例

本文整理汇总了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>
开发者ID:acuba001,项目名称:Collaborative-Platform,代码行数:31,代码来源:viewmodal.php


注:本文中的Chtml::value方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。