本文整理匯總了PHP中app\models\Profile::statuses方法的典型用法代碼示例。如果您正苦於以下問題:PHP Profile::statuses方法的具體用法?PHP Profile::statuses怎麽用?PHP Profile::statuses使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類app\models\Profile
的用法示例。
在下文中一共展示了Profile::statuses方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: actionIndex
public function actionIndex()
{
$statuses = \app\models\Profile::statuses();
$dataProvider = Profile::search();
return $this->render('index', ['dataProvider' => $dataProvider, 'statuses' => $statuses]);
}
示例2:
<?php
/**
* $model Profile model
*/
$form = \yii\bootstrap\ActiveForm::begin(['enableClientValidation' => true, 'options' => ['enctype' => 'multipart/form-data']]);
?>
<?php
echo $form->field($model, 'image_tmp')->fileInput(['class' => 'btn btn-primary'])->label(Yii::t('app', 'Image'));
echo $form->field($model, 'full_name');
echo $form->field($model, 'description');
echo $form->field($model, 'status')->dropDownList(\app\models\Profile::statuses());
echo \yii\helpers\Html::a(\Yii::t('app', 'List'), ['index'], ['class' => 'btn btn-info']);
?>
<?php
echo \yii\helpers\Html::submitButton(Yii::t('app', 'Save'), ['class' => 'btn btn-primary']);
?>
<?php
$form->end();