本文整理汇总了PHP中AssetsHelper::getBooleanListData方法的典型用法代码示例。如果您正苦于以下问题:PHP AssetsHelper::getBooleanListData方法的具体用法?PHP AssetsHelper::getBooleanListData怎么用?PHP AssetsHelper::getBooleanListData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AssetsHelper
的用法示例。
在下文中一共展示了AssetsHelper::getBooleanListData方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
?>
<div id="title_section">
<div id="titleBlock">
<h1><?php
echo Yii::t('WebPagesModule.labels', 'Your web pages');
?>
</h1>
</div>
<div id="commandBlock">
<ul class="menu">
<li class="create">
<?php
echo CHtml::link(Yii::t('WebPagesModule.labels', 'Add a web page'), array('/webPages/webPage/create'));
?>
</li>
<li class="reset">
<?php
echo CHtml::link(Yii::t('app', 'Reset filters'), array('/webPages/webPage/admin', 'ajax' => 'adminGridView', 'page' => 1), array('onclick' => 'javascript:Site.resetGridViewFilters("grid-view")'));
?>
</li>
</ul>
</div>
<div class="clear"></div>
</div>
<div id="content_section">
<?php
$dataProvider = $model->search();
$dataProvider->setPagination($pager);
$this->widget('zii.widgets.grid.CGridView', array('id' => 'adminGridView', 'dataProvider' => $dataProvider, 'filter' => $model, 'template' => "{summary}\n{pager}<br/>\n{items}\n{pager}", 'columns' => array(array('header' => Yii::t('WebPagesModule.labels', 'Name'), 'name' => 'name', 'value' => 'CHtml::link(CHtml::encode($data->name), array("/webPages/webPage/view", "id" => $data->id))', 'type' => 'html'), 'title', array('header' => Yii::t('WebPagesModule.labels', 'Enabled'), 'value' => 'AssetsHelper::getImageTagForBoolean($data->enabled, false)', 'type' => 'raw', 'name' => 'enabled', 'filter' => AssetsHelper::getBooleanListData(), 'htmlOptions' => array('class' => 'center')), array('header' => Yii::t('WebPagesModule.labels', 'Texts'), 'value' => 'count($data->webTexts)', 'type' => 'raw', 'htmlOptions' => array('class' => 'center')), array('class' => 'CButtonColumn', 'template' => '{update}{delete}{view}'))));
?>
</div>
示例2: array
?>
<div id="title_section">
<div id="titleBlock">
<h1><?php
echo Yii::t('NewsModule.labels', 'Your news');
?>
</h1>
</div>
<div id="commandBlock">
<ul class="menu">
<li class="create">
<?php
echo CHtml::link(Yii::t('NewsModule.labels', 'Add a news'), array('/news/news/create'));
?>
</li>
<li class="reset">
<?php
echo CHtml::link(Yii::t('app', 'Reset filters'), array('/news/news/admin', 'ajax' => 'adminGridView', 'page' => 1), array('onclick' => 'javascript:Site.resetGridViewFilters("grid-view")'));
?>
</li>
</ul>
</div>
<div class="clear"></div>
</div>
<div id="content_section">
<?php
$dataProvider = $model->search();
$dataProvider->setPagination($pager);
$this->widget('zii.widgets.grid.CGridView', array('id' => 'adminGridView', 'dataProvider' => $dataProvider, 'filter' => $model, 'template' => "{summary}\n{pager}<br/>\n{items}\n{pager}", 'columns' => array(array('header' => Yii::t('app', "Date"), 'name' => 'eventDate', 'value' => '$data->news->event_date', 'type' => 'date', 'htmlOptions' => array('class' => 'dateColumn')), array('header' => Yii::t('app', 'Title'), 'name' => 'title', 'value' => '$data->title'), array('header' => Yii::t('app', 'Tags'), 'name' => 'tagIdFilter', 'value' => 'implode(", ", $data->getTagsNames())', 'filter' => CHtml::listData($availableTags, 'id', 'name')), array('header' => Yii::t('NewsModule.labels', 'Translations'), 'value' => 'implode(",", $data->news->getLanguagesCodes())'), array('header' => Yii::t('app', 'Enabled'), 'name' => 'enabled', 'type' => 'raw', 'value' => 'AssetsHelper::getImageTagForBoolean($data->news->enabled)', 'htmlOptions' => array('class' => 'enabledStatusColumn'), 'filter' => AssetsHelper::getBooleanListData()), array('class' => 'CButtonColumn', 'template' => '{update}{delete}{view}', 'updateButtonUrl' => 'Yii::app()->controller->createUrl("update", array("id" => $data->news->id))', 'viewButtonUrl' => 'Yii::app()->controller->createUrl("view", array("id" => $data->news->id))', 'deleteButtonUrl' => 'Yii::app()->controller->createUrl("delete", array("id" => $data->news->id))'))));
?>
</div>