implement registration

This commit is contained in:
Roland Schneider
2018-12-26 16:50:17 +01:00
parent b6e590f196
commit b2bb210cee
18 changed files with 496 additions and 51 deletions

View File

@@ -76,4 +76,20 @@ class EventType extends \yii\db\ActiveRecord
}
return ArrayHelper::merge($extra,$items);
}
/**
* Find the first ticket, which allows this event type
* @param \common\models\Ticket[] $tickets the list of active tickets
* @return Ticket|null
*/
public function findTicketAllowingEventType($tickets){
if (!isset($tickets)){
return null;
}
if ( sizeof($tickets) == 0 ){
return null;
}
// TODO: implement bossiness logic to select ticket
return $tickets[0];
}
}