/** * @inheritdoc */ public function afterFind() { $session = Yii::$app->session; // convert created_at and updated_at to date not datetime $this->updated_at = strtotime($this->updated_at); $this->created_at = strtotime($this->created_at); // convert current format of birthday to d/m/Y if ($this->birthday) { $date = \DateTime::createFromFormat('Y-d-m', $this->birthday); $this->birthday = $date->format('d/m/Y'); } // set full name for current client $this->fullname = $this->getFullName(); // get all msettings in 'edit' a client case only $id_param = Yii::$app->request->get('id'); if (isset($id_param)) { Msetting::getCurrentMSettings(1, $this->id); Csetting::getCurrentCSettings(1, $this->id); } // get filter_field return parent::afterFind(); }
/** * @inheritdoc */ public function afterFind() { // convert current format of birthday to d/m/Y if ($this->online_date) { $date = \DateTime::createFromFormat('Y-d-m', $this->online_date); $this->online_date = $date->format('d/m/Y'); } // get all msettings in 'edit' a website case only $id_param = Yii::$app->request->get('id'); if (isset($id_param)) { Csetting::getCurrentCSettings(2, $this->id); Msetting::getCurrentMSettings(2, $this->id); } }