aswi2020sebela-gitlab/website/src/Utils/Utils.php @ 92764b8b
1 |
<?php
|
---|---|
2 | |
3 |
namespace App\Utils; |
4 | |
5 |
class Utils { |
6 |
public static function prepareDatasetsNames($datasets) { |
7 |
$names = []; |
8 | |
9 |
$index = 0; |
10 |
foreach ($datasets as $key => $value) { |
11 |
if (false == array_key_exists($value['name'], $names)) { |
12 |
$names[$value['name']] = $index++; |
13 |
}
|
14 |
}
|
15 | |
16 |
return $names; |
17 |
}
|
18 |
}
|