Дипломная работа: Автоматизация управленческого учета в дошкольном образовательном учреждении (на примере ИП «Мельникова»)

Внимание! Если размещение файла нарушает Ваши авторские права, то обязательно сообщите нам
92
public function attributeLabels()
{
return [
'id' => 'ID',
'parent_id' => 'Parent ID',
'full_name' => 'Full Name',
'medical_data' => 'Medical Data',
];
}
/**
* Gets query for [[Parent]].
*
* @return \yii\db\ActiveQuery
*/
public function getParent()
{
return $this->hasOne(Parent::className(), ['id' => 'parent_id']);
}
/**
* Gets query for [[Polls]].
*
* @return \yii\db\ActiveQuery
*/
public function getPolls()
{
return $this->hasMany(Poll::className(), ['child_id' => 'id']);
}
/**
* Gets query for [[Questionnaires]].
*
* @return \yii\db\ActiveQuery
*/
public function getQuestionnaires()
{
93
return $this->hasMany(Questionnaire::className(), ['child_id' => 'id']);
}
/**
* Gets query for [[Requests]].
*
* @return \yii\db\ActiveQuery
*/
public function getRequests()
{
return $this->hasMany(Request::className(), ['child_id' => 'id']);
}
/**
* Gets query for [[Tests]].
*
* @return \yii\db\ActiveQuery
*/
public function getTests()
{
return $this->hasMany(Test::className(), ['child_id' => 'id']);
}
}
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model backend\models\Child */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="child-form">
<?php $form = ActiveForm::begin(); ?>
94
<?= $form->field($model, 'parent_id')->textInput() ?>
<?= $form->field($model, 'full_name')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'medical_data')->textarea(['rows' => 6]) ?>
<div class="form-group">
<?= Html::submitButton('Save', ['class' => 'btn btn-success']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model backend\models\ChildSearch */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="child-search">
<?php $form = ActiveForm::begin([
'action' => ['index'],
'method' => 'get',
'options' => [
'data-pjax' => 1
],
]); ?>
<?= $form->field($model, 'id') ?>
95
<?= $form->field($model, 'parent_id') ?>
<?= $form->field($model, 'full_name') ?>
<?= $form->field($model, 'medical_data') ?>
<div class="form-group">
<?= Html::submitButton('Search', ['class' => 'btn btn-primary']) ?>
<?= Html::resetButton('Reset', ['class' => 'btn btn-outline-secondary']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model backend\models\Child */
$this->title = 'Create Child';
$this->params['breadcrumbs'][] = ['label' => 'Children', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="child-create">
<h1><?= Html::encode($this->title) ?></h1>
<?= $this->render('_form', [
'model' => $model,
]) ?>
</div>
<?php
96
use yii\helpers\Html;
use yii\grid\GridView;
use yii\widgets\Pjax;
/* @var $this yii\web\View */
/* @var $searchModel backend\models\ChildSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Children';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="child-index">
<h1><?= Html::encode($this->title) ?></h1>
<p>
<?= Html::a('Create Child', ['create'], ['class' => 'btn btn-success']) ?>
</p>
<?php Pjax::begin(); ?>
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
'id',
'parent_id',
'full_name',
'medical_data:ntext',
['class' => 'yii\grid\ActionColumn'],
],
]); ?>
Источник: https://baza.diplomsite.ru/previewfile/571