implement registration
This commit is contained in:
@@ -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];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user