Commit 027eb80f authored by Shakarim Sapa's avatar Shakarim Sapa

- Отключены behaviors

parent c5112898
......@@ -27,13 +27,28 @@ class MessageTemplate extends \common\components\ActiveRecordModel
return 'Шаблоны писем';
}
public function beforeSave($insert){
if (!parent::beforeSave($insert))
return false;
if ($insert && $this->created_at==null) {
$datetime = new \DateTime();
$this->created_at = $datetime->format('Y-m-d H:i:s');
}
return true;
}
public function behaviors(){
return [];
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['name', 'template', 'created_at'], 'required'],
[['name', 'template'], 'required'],
[['template'], 'string'],
[['created_at'], 'safe'],
[['name'], 'string', 'max' => 255],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment