public function init() { $this->modelClass = UserProfile::className(); $this->findModel = UserController::className() . '::' . UserController::METHOD_FIND_MODEL; $this->checkAccess = UserController::className() . '::' . UserController::METHOD_CHECK_ACCESS; parent::init(); }
/** * @return \yii\db\ActiveQuery */ public function getUserProfiles() { return $this->hasMany(\common\models\UserProfile::className(), ['currency_id' => 'id']); }
/** * @return \yii\db\ActiveQuery */ public function getUserProfile() { return $this->hasOne(UserProfile::className(), ['user_id' => 'id']); }
public function getUserProfile() { return $this->hasOne(UserProfile::className(), array('user_id' => 'staff_id')); }