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


PHP L::items方法代码示例

本文整理汇总了PHP中L::items方法的典型用法代码示例。如果您正苦于以下问题:PHP L::items方法的具体用法?PHP L::items怎么用?PHP L::items使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在L的用法示例。


在下文中一共展示了L::items方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: relations

 /**
  * @return array relational rules.
  */
 public function relations()
 {
     // NOTE: you may need to adjust the relation name and the related
     // class name for the relations automatically generated below.
     $items = L::items('CommentType');
     $a = array();
     foreach ($items as $k => $label) {
         $a[$label] = array(self::BELONGS_TO, $label, 'object_id');
     }
     return array_merge($a, array('user_author' => array(self::BELONGS_TO, 'User', 'author')));
 }
开发者ID:BGCX261,项目名称:zoomtyre-svn-to-git,代码行数:14,代码来源:Comment.php

示例2: array

<?php

$this->breadcrumbs = array('Диски' => array('index'), 'Управление дисками');
$this->menu = array(array('label' => 'Обзор дисков', 'url' => array('index')), array('label' => 'Добавить диск', '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\$.fn.yiiGridView.update('disk-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
?>

<h1>Управление дисками</h1>

<p>
Можно использовать операторы сравнения (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>&lt;&gt;</b>
или <b>=</b>) в начале запроса.
</p>

<?php 
echo CHtml::link('Расширенный поиск', '#', 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' => 'disk-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array('id', array('name' => 'producer_id', 'value' => '$data->producer->title', 'filter' => CHtml::listData(DiskProducers::model()->findAll(), 'id', 'title')), 'title', 'alias', array('name' => 'new', 'value' => 'L::ruitem(\'boolean\', $data->new)', 'filter' => L::ruitems('boolean')), array('name' => 'sale', 'value' => 'L::ruitem(\'boolean\', $data->sale)', 'filter' => L::ruitems('boolean')), array('name' => 'construction_type', 'value' => 'L::ruitem(\'diskConstructionType\', $data->construction_type)', 'filter' => L::ruitems('diskConstructionType')), array('name' => 'color', 'value' => 'L::item(\'color\', $data->color)', 'filter' => L::items('color')), 'model_id', array('class' => 'CButtonColumn'))));
开发者ID:BGCX261,项目名称:zoomtyre-svn-to-git,代码行数:25,代码来源:admin.php

示例3: array

echo $form->labelEx($tyreSelection, 'diameter');
?>
		<?php 
echo $form->dropDownList($tyreSelection, 'diameter', CHtml::listData(TyreSizes::model()->inSight()->findAll(array('group' => 'diameter')), 'diameter', 'diameter'), array('empty' => ''));
?>
		<?php 
echo $form->error($tyreSelection, 'diameter');
?>
	</div>
	
	<div class="row">
		<?php 
echo $form->labelEx($tyreSelection, 'season');
?>
		<?php 
echo $form->dropDownList($tyreSelection, 'season', L::items('tyreSeason'), array('empty' => 'Неважно'));
?>
		<?php 
echo $form->error($tyreSelection, 'season');
?>
	</div>
	
	<div class="row">
		<?php 
echo $form->labelEx($tyreSelection, 'puncture');
?>
		<?php 
echo $form->dropDownList($tyreSelection, 'puncture', L::ruitems('boolean'), array('empty' => 'Неважно'));
?>
		<?php 
echo $form->error($tyreSelection, 'puncture');
开发者ID:BGCX261,项目名称:zoomtyre-svn-to-git,代码行数:31,代码来源:tyres_simple.php

示例4: array

<?php

$this->breadcrumbs = array('Characteristics' => array('index'), 'Manage');
$this->menu = array(array('label' => 'Добавить', '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\$.fn.yiiGridView.update('characteristic-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
?>

<h1>Управление характеристиками</h1>

<p class="hint">
Можно использовать операторы сравнения (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>&lt;&gt;</b>
или <b>=</b>) в начале запроса.
</p>

<?php 
echo CHtml::link('Расширенный поиск', '#', 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' => 'characteristic-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array('id', array('name' => 'brandTitle', 'value' => '$data->modification->model->brand->title'), array('name' => 'modelTitle', 'value' => '$data->modification->model->title'), array('name' => 'modificationTitle', 'value' => '$data->modification->title'), array('name' => 'body', 'value' => 'L::item(\'BodyTypes\', $data->body)', 'filter' => L::items('BodyTypes')), array('class' => 'CButtonColumn'))));
开发者ID:BGCX261,项目名称:zoomtyre-svn-to-git,代码行数:25,代码来源:admin.php

示例5: array

echo $form->labelEx($model, 'main');
?>
		<?php 
echo $form->dropDownList($model, 'main', L::items('boolean'));
?>
		<?php 
echo $form->error($model, 'main');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'visible');
?>
		<?php 
echo $form->dropDownList($model, 'visible', L::items('boolean'));
?>
		<?php 
echo $form->error($model, 'visible');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'htmlOptions');
?>
		<?php 
echo $form->textField($model, 'htmlOptions', array('size' => 60, 'maxlength' => 255));
?>
		<?php 
echo $form->error($model, 'htmlOptions');
开发者ID:BGCX261,项目名称:zoomtyre-svn-to-git,代码行数:31,代码来源:_form.php

示例6: array

<?php

$this->breadcrumbs = array('Партнёры' => array('index'), 'Управление партнёрами');
$this->menu = array(array('label' => 'Обзор партнёров', 'url' => array('index')), array('label' => 'Добавить партнёра', '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\$.fn.yiiGridView.update('partner-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
?>

<h1>Управление партнёрами</h1>

<p>
Можно использовать операторы сравнения (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>&lt;&gt;</b>
или <b>=</b>) в начале запроса.
</p>

<?php 
echo CHtml::link('Расширенный поиск', '#', 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' => 'partner-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array('id', 'title', 'alias', array('name' => 'type', 'value' => 'L::item(\'partnerType\', $data->type)', 'filter' => L::items('partnerType')), 'username', 'phone', 'address', 'email', 'url', array('class' => 'CButtonColumn'))));
开发者ID:BGCX261,项目名称:zoomtyre-svn-to-git,代码行数:25,代码来源:admin.php

示例7:

	<?php echo $form->labelEx($model,'csvFile'); ?>
	<?php echo $form->fileField($model,'csvFile'); ?>
	<p class='hint'>Или набивайте в ручную. Первая колонка название параметра, вторая значение. Образец <a href='/files/charcteristics.example.csv'>тут</a>.</p>
	<?php echo $form->error($model,'csvFile'); ?>
</div>
*/
?>

	<h3 class='header3'>Общие данные</h3>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'body');
?>
		<?php 
echo $form->dropDownList($model, 'body', L::items('bodyType'));
?>
		<?php 
echo $form->error($model, 'body');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'doors');
?>
		<?php 
echo $form->textField($model, 'doors');
?>
		<?php 
echo $form->error($model, 'doors');
开发者ID:BGCX261,项目名称:zoomtyre-svn-to-git,代码行数:31,代码来源:_form.php

示例8:

echo $form->labelEx($model, 'stud');
?>
		<?php 
echo $form->checkBox($model, 'stud');
?>
		<?php 
echo $form->error($model, 'stud');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'construction_type');
?>
		<?php 
echo $form->dropDownList($model, 'construction_type', L::items('tyreConstructionType'));
?>
		<?php 
echo $form->error($model, 'construction_type');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'runflat_type');
?>
		<?php 
echo $form->checkBox($model, 'runflat_type');
?>
		<?php 
echo $form->error($model, 'runflat_type');
开发者ID:BGCX261,项目名称:zoomtyre-svn-to-git,代码行数:31,代码来源:_form.php

示例9: array

	<div class="row">
		<?php 
echo $form->label($model, 'stud');
?>
		<?php 
echo $form->dropDownList($model, 'stud', L::ruitems('boolean'), array('empty' => ''));
?>
	</div>

	<div class="row">
		<?php 
echo $form->label($model, 'construction_type');
?>
		<?php 
echo $form->dropDownList($model, 'construction_type', L::items('tyreConstructionType'), array('empty' => ''));
?>
	</div>

	<div class="row">
		<?php 
echo $form->label($model, 'runflat_type');
?>
		<?php 
echo $form->dropDownList($model, 'runflat_type', L::ruitems('boolean'), array('empty' => ''));
?>
	</div>

	<div class="row buttons">
		<?php 
echo CHtml::submitButton('Искать');
开发者ID:BGCX261,项目名称:zoomtyre-svn-to-git,代码行数:30,代码来源:_search.php

示例10: array

<?php

$this->breadcrumbs = array('Пользователи' => array('index'), 'Управление пользователями');
$this->menu = array(array('label' => 'Обзор пользователей', 'url' => array('index')), array('label' => 'Добавить пользователя', '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\$.fn.yiiGridView.update('user-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
?>

<h1>Управление пользователями</h1>

<p>
Можно использовать операторы сравнения (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>&lt;&gt;</b>
или <b>=</b>) в начале запроса.
</p>

<?php 
echo CHtml::link('Расширенный поиск', '#', 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' => 'user-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array('username', 'email', 'avatar', array('name' => 'status', 'value' => 'L::item("userStatus", $data->status)', 'filter' => L::items('userStatus')), 'created', array('class' => 'CButtonColumn'))));
开发者ID:BGCX261,项目名称:zoomtyre-svn-to-git,代码行数:25,代码来源:admin.php

示例11: array

	<div class="row">
		<?php 
echo $form->label($model, 'construction_type');
?>
		<?php 
echo $form->dropDownList($model, 'construction_type', L::items('diskConstructionType'), array('empty' => ''));
?>
	</div>

	<div class="row">
		<?php 
echo $form->label($model, 'color');
?>
		<?php 
echo $form->dropDownList($model, 'color', L::items('color'), array('empty' => ''));
?>
	</div>

	<div class="row">
		<?php 
echo $form->label($model, 'model_id');
?>
		<?php 
echo $form->textField($model, 'model_id');
?>
	</div>

	<div class="row buttons">
		<?php 
echo CHtml::submitButton('Искать');
开发者ID:BGCX261,项目名称:zoomtyre-svn-to-git,代码行数:30,代码来源:_search.php

示例12: array

    echo $form->error($model, 'name');
    ?>
		</div>
		<?php 
    echo $form->hiddenField($item_child, 'parent', array('value' => $parent->name));
    ?>
	<?php 
}
?>
	
	<div class="row">
		<?php 
echo $form->labelEx($model, 'type');
?>
		<?php 
echo $form->dropDownList($model, 'type', L::items('AuthItemType'));
?>
		<?php 
echo $form->error($model, 'type');
?>
	</div>
	
	<div class="row">
		<?php 
echo $form->labelEx($model, 'description');
?>
		<?php 
echo $form->textArea($model, 'description', array('cols' => 60, 'rows' => 8));
?>
		<?php 
echo $form->error($model, 'description');
开发者ID:BGCX261,项目名称:zoomtyre-svn-to-git,代码行数:31,代码来源:_form.php

示例13: array

?>
		<?php 
echo $form->error($model, 'alias');
?>
	</div>
	
	<?php 
$this->widget('ext.uploader.uploader', array('model' => $model, 'name' => 'logo', 'options' => array('skin' => 'simple', 'allowDelete' => false, 'preview' => Image::getFile($model->logo, 'normal'))));
?>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'archive');
?>
		<?php 
echo $form->dropDownList($model, 'archive', L::items('ArchiveStatus'));
?>
		<?php 
echo $form->error($model, 'archive');
?>
	</div>
	
	<!--  
	<div class="row">
		<?php 
echo $form->labelEx($model, 'country');
?>
		<?php 
echo $form->textField($model, 'country', array('size' => 10, 'maxlength' => 10));
?>
		<?php 
开发者ID:BGCX261,项目名称:zoomtyre-svn-to-git,代码行数:31,代码来源:_form.php

示例14: array

	<div class="row">
		<?php 
echo $form->label($model, 'alias');
?>
		<?php 
echo $form->textField($model, 'alias', array('size' => 45, 'maxlength' => 45));
?>
	</div>
	
	<div class="row">
		<?php 
echo $form->label($model, 'type');
?>
		<?php 
echo $form->dropDownList($model, 'type', L::items('partnerType'), array('empty' => ''));
?>
	</div>

	<div class="row">
		<?php 
echo $form->label($model, 'username');
?>
		<?php 
echo $form->textField($model, 'username', array('size' => 45, 'maxlength' => 45));
?>
	</div>

	<div class="row">
		<?php 
echo $form->label($model, 'description');
开发者ID:BGCX261,项目名称:zoomtyre-svn-to-git,代码行数:30,代码来源:_search.php

示例15: array

echo $form->labelEx($model, 'email');
?>
		<?php 
echo $form->textField($model, 'email', array('size' => 60, 'maxlength' => 80));
?>
		<?php 
echo $form->error($model, 'email');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'status');
?>
		<?php 
echo $form->dropDownList($model, 'status', L::items('userStatus'));
?>
		<?php 
echo $form->error($model, 'status');
?>
	</div>
	
	<div class="row">
		<?php 
echo $form->labelEx($model, 'avatar');
?>
		<?php 
$this->widget('admin.widgets.upload.imageUpload', array('model' => $model, 'field' => 'avatar'));
?>
		<?php 
echo $form->error($model, 'avatar');
开发者ID:BGCX261,项目名称:zoomtyre-svn-to-git,代码行数:31,代码来源:_form.php


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