當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Teacher::teachers方法代碼示例

本文整理匯總了PHP中Teacher::teachers方法的典型用法代碼示例。如果您正苦於以下問題:PHP Teacher::teachers方法的具體用法?PHP Teacher::teachers怎麽用?PHP Teacher::teachers使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Teacher的用法示例。


在下文中一共展示了Teacher::teachers方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: array

<?php

/* @var $this SubjectTeacherController */
/* @var $model SubjectTeacher */
$this->breadcrumbs = array('Subject Teachers' => array('index'), 'Manage');
$this->menu = array(array('label' => 'List SubjectTeacher', 'url' => array('index')), array('label' => 'Create SubjectTeacher', '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\$('#subject-teacher-grid').yiiGridView('update', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
?>

<h1>Manage Subject Teachers</h1>

<p>
You may optionally enter a comparison operator (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>&lt;&gt;</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('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' => 'subject-teacher-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array('id' => ['name' => 'id', 'htmlOptions' => ['width' => 30]], 'subject_id' => ['name' => 'subject_id', 'value' => '$data->subject->name', 'filter' => Subject::subjects()], 'teacher_id' => ['name' => 'teacher_id', 'value' => '$data->teacher->fio', 'filter' => Teacher::teachers()], array('class' => 'CButtonColumn'))));
開發者ID:DostonAkhmedov,項目名稱:Dars_jadvali,代碼行數:27,代碼來源:admin.php

示例2:

	</div>

	<div class="row">
		<?php 
echo $form->label($model, 'megalka');
?>
		<?php 
echo $form->dropDownList($model, 'megalka', Dgst::megalka());
?>
	</div>

	<div class="row">
		<?php 
echo $form->label($model, 'teacher2_id');
?>
		<?php 
echo $form->dropDownList($model, 'teacher2_id', Teacher::teachers());
?>
	</div>

	<div class="row buttons">
		<?php 
echo CHtml::submitButton('Search');
?>
	</div>

<?php 
$this->endWidget();
?>

</div><!-- search-form -->
開發者ID:DostonAkhmedov,項目名稱:Dars_jadvali,代碼行數:31,代碼來源:_search.php


注:本文中的Teacher::teachers方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。