Skip to content

Commit

Permalink
Merge a37fc47 into 35c3244
Browse files Browse the repository at this point in the history
  • Loading branch information
tafid committed Sep 5, 2019
2 parents 35c3244 + a37fc47 commit 4a37503
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/widgets/combo/ServerTypeRefCombo.php
Expand Up @@ -7,15 +7,18 @@

class ServerTypeRefCombo extends RefCombo
{
public function prepareData()
/**
* @return array
*/
public function prepareData(): array
{
$refs = parent::prepareData();
if (Yii::$app->user->can('ref.view.not-used')) {
return $refs;
}

return array_filter($refs, function ($k) {
return in_array($k, ['dedicated', 'unmanaged']);
return array_filter($refs, static function (string $k): bool {
return in_array($k, ['dedicated', 'unmanaged', 'setup', 'jbod', 'remote', 'vds', 'avds', 'ovds', 'svds', 'cdn', 'cdnpix', 'nic', 'uplink3'], true);
}, ARRAY_FILTER_USE_KEY);
}
}

0 comments on commit 4a37503

Please sign in to comment.