Working on payout display for League, Pokal, GreenShirt
This commit is contained in:
parent
9d70a2dc08
commit
81ab879ecc
4 changed files with 56 additions and 13 deletions
|
|
@ -12,6 +12,23 @@ class ManualPayout extends Model
|
|||
'season_id','quota_name','user_id'
|
||||
];
|
||||
|
||||
public static function getManualQuotaNames() {
|
||||
$manualQuotas=array('Liga Platz 1','Liga Platz 2','Liga Platz 3','Liga Platz 2_1','Liga Platz 3_1','Pokal');
|
||||
return $manualQuotas;
|
||||
}
|
||||
|
||||
public static function getWinners() {
|
||||
$winners=array();
|
||||
$manualQuotas=ManualPayout::getManualQuotaNames();
|
||||
foreach ($manualQuotas as $quota) {
|
||||
$userId=0;
|
||||
$winner=ManualPayout::getWinner($quota);
|
||||
if ($winner) { $userId=$winner->id; }
|
||||
$winners[$quota]=$userId;
|
||||
}
|
||||
return $winners;
|
||||
}
|
||||
|
||||
public static function getWinner($quotaName) {
|
||||
$season = Season::getCurrent();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue