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


PHP TbHtml::CheckBoxList方法代码示例

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


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

示例1: array

$selected_characteristic = array();
//para cada plataforma, insere os id_plataforma escolhidos no array
foreach ($model->characteristic as $characteristic) {
    array_push($selected_characteristic, $characteristic->id);
}
?>
			
			<div>
				<?php 
echo TbHtml::label($model->getAttributeLabel('characteristic'), 'Characteristic');
?>
			    <p class="help-block">Choose the platform's characteristics:</p>
                            <div class="model-char">	
				<div class="portlet-content">
				<?php 
echo TbHtml::CheckBoxList('Characteristic', $selected_characteristic, CHtml::listData(Characteristic::model()->findAll(), 'id', 'name'), array('template' => '{input} {label}'));
?>
				<?php 
echo $form->error($model, 'characteristic');
?>
				</div>
			</div>
    </div>
    </div>
    
    
    <?php 
$this->endWidget();
?>

</div><!-- form -->
开发者ID:raphaelrocha,项目名称:mtcontrool_mtcontext,代码行数:31,代码来源:_form.php

示例2: foreach

//var_dump($model->platforms);
foreach ($model->devices as $device) {
    array_push($selected_devices, $device->ID);
}
?>
			
			
			<br/><br/>
			<div>
				<?php 
echo TbHtml::label($model->getAttributeLabel('devices'), 'Device');
?>
				
				<div class="portlet-content" id="divprincipal">
				<?php 
echo TbHtml::CheckBoxList('Devices', $selected_devices, CHtml::listData(Device::model()->findAll(), 'ID', 'DESCRIPTION'), array('template' => '{input} {label}'));
?>
				<?php 
echo $form->error($model, 'device');
?>
				</div>
			</div>
			-->

    </br>




	<?php 
//echo $form->dropDownListControlGroup($model,'ID_PLATFORM',$platformsArray, array('span'=>5, 'empty' => '--- Escolha uma plataforma ---'));
开发者ID:raphaelrocha,项目名称:mtcontrool_mtcontext,代码行数:31,代码来源:_form.php

示例3: foreach

//var_dump($model->platforms);
foreach ($model->platforms as $platform) {
    array_push($selected_platforms, $platform->id);
}
?>
			
			
			<div>
				<?php 
echo TbHtml::label($model->getAttributeLabel('platforms'), 'Platforms');
?>
				
				<div class="portlet-content">
				<!--echo TbHtml::inlineCheckBoxList('Platforms',/*'', $platformsArray,*/-->
				<?php 
echo TbHtml::CheckBoxList('Platforms', $selected_platforms, CHtml::listData(Platforms::model()->findAll(), 'id', 'name'), array('id' => 'item', 'template' => '{input} {label}', 'onchange' => 'verificaChecks()'));
?>
				<?php 
echo $form->error($model, 'platforms');
?>
				</div>
			</div>


    </br>


	</div>
    <?php 
$this->endWidget();
?>
开发者ID:raphaelrocha,项目名称:mtcontrool_mtcontext,代码行数:31,代码来源:_form.php

示例4: foreach

foreach ($model->devices as $device) {
    array_push($selected_devices, $device->ID);
}
?>


			
			
			<div>
				<?php 
echo TbHtml::label($model->getAttributeLabel('devices'), 'Device');
?>
				
				<div class="portlet-content" id="divprincipal">
				<?php 
echo TbHtml::CheckBoxList('Devices', $selected_devices, $devicesArray, array('template' => '{input} {label}'));
?>
				<?php 
echo $form->error($model, 'device');
?>
				</div>
			</div>
			

    </br>




	<?php 
//echo $form->dropDownListControlGroup($model,'ID_PLATFORM',$platformsArray, array('span'=>5, 'empty' => '--- Escolha uma plataforma ---'));
开发者ID:raphaelrocha,项目名称:mtcontrool_mtcontext,代码行数:31,代码来源:_form_p2.php


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