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


PHP Company::getList方法代码示例

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


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

示例1: function

echo $form->errorSummary($model);
?>

<?php 
echo $form->dropDownListGroup($model, 'role_id', ['widgetOptions' => ['data' => User::$roleMap, 'htmlOptions' => ['class' => 'span5']]]);
?>

<?php 
echo $form->select2Group($model, 'company_id', ['widgetOptions' => ['options' => ['tags' => Company::getSelect2List(), 'createSearchChoice' => 'js:function(term, data) {
                var filter = function() {
                   return this.text.localeCompare(term) === 0;
                };
                if ( $(data).filter(filter).length === 0 ) {
                    return {id:term, text:term};
                }
            }', 'tokenSeparators' => [','], 'maximumSelectionSize' => 1], 'asDropDownList' => false, 'data' => Company::getList(), 'htmlOptions' => ['class' => 'span5', 'maxlength' => 5]]]);
?>

<?php 
echo $form->textFieldGroup($model, 'fullname', ['widgetOptions' => ['htmlOptions' => ['class' => 'span5', 'maxlength' => 100]]]);
?>

<?php 
echo $form->textFieldGroup($model, 'email', ['widgetOptions' => ['htmlOptions' => ['class' => 'span5', 'maxlength' => 100]]]);
?>

<h5><strong><?php 
echo Yii::t('main', 'Phone Numbers');
?>
:</strong></h5>
开发者ID:septembermd,项目名称:n1,代码行数:30,代码来源:_form.php

示例2: array

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

        <div class="row">
		<?php 
echo $form->labelEx($model, 'company_id');
?>
		<?php 
echo $form->dropDownList($model, 'company_id', Company::getList(), array('ajax' => array('type' => 'POST', 'url' => CController::createUrl('person/getdepartments'), 'update' => '#Person_department_id')));
?>
		<?php 
echo $form->error($model, 'company_id');
?>
	</div>
        
        <div class="row">
		<?php 
echo $form->labelEx($model, 'department_id');
?>
		<?php 
if (empty($model->department_id)) {
    echo $form->dropDownList($model, 'department_id', array(null => 'Сначала выбери организацию'));
} else {
    echo $form->dropDownList($model, 'department_id', Department::getList());
开发者ID:griffindor,项目名称:own-inventory,代码行数:31,代码来源:_form.php

示例3: actionSql

 public function actionSql()
 {
     if (isset($_POST['code']) && $_POST['code']) {
         $sql_input = $_POST['code'];
         preg_match_all('/.+;\\r\\n/sU', $sql_input, $out, PREG_SET_ORDER);
         foreach ($out as $command) {
             $echo .= '<br>Command:<br>';
             $cmd = $command[0];
             foreach (Company::getList() as $key => $company) {
                 $cur_cmd = preg_replace('/[0-9]+_/', $key . '_', $cmd);
                 $sql .= $cur_cmd . "\n";
                 $echo .= $cur_cmd . "<br>";
                 //$sql_mass[] = $cur_cmd;
             }
         }
         try {
             $rows = Yii::app()->db->createCommand($sql)->execute();
             $echo = 'Success: ' . $rows . ' rows...<br>' . $echo;
         } catch (Exception $e) {
             $echo = 'Error!<br>' . $echo . '<br>' . $e;
         }
     }
     $this->render('sql', array('echo' => $echo));
 }
开发者ID:akoch-ov,项目名称:dipstart-development,代码行数:24,代码来源:CompanyController.php


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