surat/frontend/modules/register/models/DateForm.php

49 lines
1.2 KiB
PHP
Raw Normal View History

2024-12-25 03:04:59 +00:00
<?php
namespace frontend\modules\register\models;
use yii\base\Model;
class DateForm extends Model
{
public $date_start;
public $date_end;
2025-04-22 04:13:36 +00:00
public $pathologist_id;
2025-04-24 03:19:33 +00:00
public $cancer_registry_id;
2025-05-06 02:34:30 +00:00
public $organ_code;
2024-12-25 03:04:59 +00:00
/**
* @return array|array[]
*/
public function rules()
{
return [
[['date_start', 'date_end'], 'required'],
2025-05-06 02:34:30 +00:00
[['pathologist_id', 'cancer_registry_id', 'organ_code'], 'integer'],
2024-12-25 03:04:59 +00:00
];
}
/**
* @return array|string[]
*/
public function attributeLabels()
{
return [
'date_start' => 'วันเริ่มต้น',
'date_end' => 'วันสิ้นสุด',
2025-04-22 04:13:36 +00:00
'pathologist_id' => 'พยาธิแพทย์',
2025-04-24 03:19:33 +00:00
'cancer_registry_id' => 'Cancer Registry',
2025-05-06 02:34:30 +00:00
'organ_code' => 'Organ Code',
2024-12-25 03:04:59 +00:00
];
}
public function attributeHints()
{
return [
'date_start' => 'วัน/เดือน/ปี ค.ศ. เช่น ' . date('d/m/Y'),
'date_end' => 'วัน/เดือน/ปี ค.ศ. เช่น ' . date('d/m/Y'),
];
}
2025-04-22 04:13:36 +00:00
}