add registrations to customer gui

This commit is contained in:
2020-01-01 21:05:37 +01:00
committed by Roland Schneider
parent 2c5db234ce
commit 753cd46b2c
34 changed files with 473 additions and 98 deletions

View File

@@ -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;
}
}