public function actionLogs()
 {
     $model = new SysParam();
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         \Yii::$app->getSession()->setFlash('success', 'Parameters succesfully updated!');
     }
     return $this->render('logs', ['model' => $model]);
 }
Exemple #2
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return ['timestamp' => ['class' => TimestampBehavior::className(), 'attributes' => [ActiveRecord::EVENT_BEFORE_INSERT => ['creation_date', 'last_update', 'last_pswd_reset'], ActiveRecord::EVENT_BEFORE_UPDATE => ['last_update']], 'value' => new Expression('NOW()')], 'blameable' => ['class' => BlameableBehavior::className(), 'createdByAttribute' => 'idsys_creator', 'updatedByAttribute' => 'idsys_updater'], 'audittrail' => ['class' => LoggableBehavior::className(), 'active' => SysParam::audit_log()]];
 }