本文整理匯總了PHP中pavlinter\adm\Adm::begin方法的典型用法代碼示例。如果您正苦於以下問題:PHP Adm::begin方法的具體用法?PHP Adm::begin怎麽用?PHP Adm::begin使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類pavlinter\adm\Adm
的用法示例。
在下文中一共展示了Adm::begin方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
<?php
use yii\helpers\Html;
use pavlinter\buttons\InputButton;
use pavlinter\adm\Adm;
use yii\helpers\Url;
/* @var $this yii\web\View */
/* @var $model app\models\ContactMsg */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="contact-msg-form">
<?php
$form = Adm::begin('ActiveForm');
?>
<div class="row">
<div class="col-xs-12 col-sm-4 col-md-4">
<?php
echo $form->field($model, 'from_email')->textInput(['maxlength' => 320]);
?>
</div>
<div class="col-xs-12 col-sm-4 col-md-4">
<?php
echo $form->field($model, 'to_email')->textInput(['maxlength' => 320]);
?>
</div>
<div class="col-xs-12 col-sm-4 col-md-4">
<?php
echo $form->field($model, 'subject')->textInput(['maxlength' => 300]);
示例2:
$userModel = Adm::getInstance()->manager->createUser();
$languages = Yii::$app->getI18n()->getLanguages();
$attributes = $userModel->attributes();
$var = '';
foreach ($attributes as $attribute) {
if (in_array($attribute, ['auth_key', 'password_hash', 'password_reset_token', 'role', 'status'])) {
continue;
}
$var .= "{" . $attribute . "} - " . $userModel->getAttributeLabel($attribute) . "<br/>";
}
?>
<div class="oplata-transaction-form m-t-lg">
<?php
$form = Adm::begin('ActiveForm', ['id' => 'order-form']);
?>
<div class="row">
<div class="col-md-6">
<section class="panel">
<header class="panel-heading">
<?php
if ($model->isNewRecord) {
?>
<?php
echo Adm::t('oplata', 'Order');
?>
<?php
} else {
?>