本文整理汇总了PHP中Catalog::getAllVarnames方法的典型用法代码示例。如果您正苦于以下问题:PHP Catalog::getAllVarnames方法的具体用法?PHP Catalog::getAllVarnames怎么用?PHP Catalog::getAllVarnames使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Catalog
的用法示例。
在下文中一共展示了Catalog::getAllVarnames方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<?php
/* @var $this CategoriesController */
/* @var $model Categories */
$this->menu = array(array('label' => Yii::t('site', 'Create Categories'), 'url' => array('create')));
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$('#catalog-grid').yiiGridView('update', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
?>
<h1><?php
echo Yii::t('site', 'Manage Catalog');
?>
</h1>
<p>
<?php
echo Yii::t('site', 'You may optionally enter a comparison operator (<b><</b>, <b><=</b>, <b>></b>, <b>>=</b>, <b><></b> or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done.');
?>
</p>
<?php
echo CHtml::link(Yii::t('site', 'Advanced Search'), '#', array('class' => 'search-button'));
?>
<div class="search-form" style="display:none">
<?php
$this->renderPartial('_search', array('model' => $model));
?>
</div><!-- search-form -->
<?php
$this->widget('zii.widgets.grid.CGridView', array('id' => 'categories-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array('id', array('name' => 'field_varname', 'filter' => Catalog::getAllVarnames()), 'cat_name', array('name' => 'parent_id', 'type' => 'raw', 'value' => 'Catalog::model()->performParent($data->parent_id)'), array('class' => 'CButtonColumn'))));
示例2: array
<?php
//Yii::app()->getClientScript()->registerCssFile(Yii::app()->theme->baseUrl.'/css/manager.css');
?>
<div class="row white-block">
<?php
/* @var $this CategoriesController */
/* @var $dataProvider CActiveDataProvider */
//$this->breadcrumbs=array(
// Yii::t('site','Catalog'),
//);
$this->menu = array(array('label' => Yii::t('site', 'Catalog'), 'url' => array('create')), array('label' => Yii::t('site', 'Manage Catalog'), 'url' => array('admin')));
?>
<h1><?php
echo Yii::t('site', 'Catalog');
?>
</h1>
<?php
$list = Catalog::getAllVarnames();
echo CHtml::link(CHtml::encode('All'), array('index')) . ' ';
foreach ($list as $key => $value) {
echo CHtml::link(CHtml::encode($value), array('index', 'field_varname' => $key)) . ' ';
}
$this->widget('zii.widgets.CListView', array('dataProvider' => $dataProvider, 'itemView' => '_view'));
?>
</div>