add registrations to customer gui
This commit is contained in:
@@ -68,11 +68,19 @@ class EventRegistration extends \yii\db\ActiveRecord
|
||||
|
||||
|
||||
public function getEvent(){
|
||||
return $this->hasOne(Event::class,['id' => 'id_event']);
|
||||
return $this->hasOne($this->getEventClass(),['id' => 'id_event']);
|
||||
}
|
||||
|
||||
public function getCustomer(){
|
||||
return $this->hasOne(Customer::class,['id' => 'id_customer']);
|
||||
return $this->hasOne($this->getCustomerClass(),['id' => 'id_customer']);
|
||||
}
|
||||
|
||||
|
||||
public function getEventClass(){
|
||||
return Event::class;
|
||||
}
|
||||
|
||||
public function getCustomerClass(){
|
||||
return Customer::class;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user