本文整理匯總了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>