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


PHP Dept::find方法代码示例

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


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

示例1: update

 /**
  * Update Informasi Departement
  *
  * @param $id
  *
  * @return mixed
  */
 public function update($id)
 {
     $db = $this->departement->find($id);
     $canUpdate = $db->canUpdate();
     if ($canUpdate) {
         /** @noinspection PhpUndefinedFieldInspection */
         $db->name = Input::get('name');
         /** @noinspection PhpUndefinedFieldInspection */
         $db->info = Input::get('info');
         /** @noinspection PhpUndefinedFieldInspection */
         $db->uuid = uniqid('Update_');
         $updated = $db->save();
         return $this->response($db->toArray(), $updated);
     }
     return $this->response(array(), $canUpdate);
 }
开发者ID:emayk,项目名称:ics,代码行数:23,代码来源:impEloquent.php

示例2:

<?php

use yii\helpers\Html;
use kartik\widgets\ActiveForm;
use kartik\builder\Form;
use kartik\builder\FormGrid;
use kartik\widgets\FileInput;
use yii\helpers\ArrayHelper;
$this->sideMenu = 'hrd';
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_VERTICAL]);
$nlDigit = Dept::find()->count() + 1;
$nl = 'LG' . $nlDigit;
?>

<?php 
echo FormGrid::widget(['model' => $model, 'form' => $form, 'autoGenerateColumns' => true, 'rows' => [['contentBefore' => '<legend class="text-info"><small>DEPARTMENT IDENTITY</small></legend>', 'columns' => 1, 'autoGenerateColumns' => false, 'attributes' => ['employe_identity' => ['label' => 'Dept.ID', 'columns' => 5, 'attributes' => ['DEP_ID' => ['type' => Form::INPUT_TEXT, 'Form::SIZE_LARGE', 'options' => [], 'columnOptions' => ['colspan' => 3]], 'DEP_NM' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Department Name...'], 'columnOptions' => ['colspan' => 4]], 'DEP_DCRP' => ['type' => Form::INPUT_TEXTAREA, 'options' => ['placeholder' => 'Department Description ...'], 'columnOptions' => ['colspan' => 4]], 'SORT' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'SORT...'], 'columnOptions' => ['colspan' => 4]]]]]], ['attributes' => ['actions' => ['type' => Form::INPUT_RAW, 'value' => '<div style="text-align: right; margin-top: 20px">' . Html::resetButton('Reset', ['class' => 'btn btn-default']) . ' ' . Html::submitButton('Submit', ['class' => 'btn btn-primary']) . '</div>']]]]]);
ActiveForm::end();
开发者ID:ptrnov,项目名称:ubudsatu,代码行数:17,代码来源:_form.php

示例3:

<?php

use yii\helpers\Html;
use yii\helpers\ArrayHelper;
use app\models\hrd\Modulset;
use kartik\detail\DetailView;
use yii\bootstrap\Modal;
use kartik\widgets\ActiveField;
use kartik\widgets\ActiveForm;
use kartik\builder\Form;
use kartik\icons\Icon;
use kartik\widgets\Growl;
$this->mddPage = 'hrd';
//$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Maxiprodaks'), 'url' => ['prodak']];
//$this->params['breadcrumbs'][] = $this->title;
$Dept_MDL = Dept::find()->where(['DEP_ID' => $model->DEP_ID])->orderBy('SORT')->one();
$Val_Jabatan = $Dept_MDL->DEP_NM;
$attribute = [['attribute' => 'DEP_ID'], ['attribute' => 'DEP_NM'], ['attribute' => 'DEP_DCRP', 'format' => 'raw', 'type' => DetailView::INPUT_TEXTAREA, 'widgetOptions' => ['data' => 'DEP_DCRP', 'options' => ['placeholder' => 'Position Description ...'], 'pluginOptions' => ['allowClear' => true]]], ['attribute' => 'SORT']];
echo DetailView::widget(['model' => $model, 'condensed' => true, 'hover' => true, 'mode' => DetailView::MODE_VIEW, 'panel' => ['heading' => $model->DEP_ID . '| ' . $model->DEP_NM, 'type' => DetailView::TYPE_INFO], 'attributes' => $attribute]);
?>

开发者ID:ptrnov,项目名称:WND-W,代码行数:20,代码来源:view.php


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