Пример #1
0
 protected function prepareSave()
 {
     if (!($profile = $this->getUserProfile())) {
         $this->assignUserProfile();
     }
     parent::prepareSave();
 }
Пример #2
0
 protected function prepareSave()
 {
     $this->getData('avatar') or $this->setData('avatar', $this->generateAvatarUrl());
     $this->extra_data or $this->extra_data = [];
     parent::prepareSave();
 }