$labels значение -> подпись, в порядке вывода * @param string $current значение из настроек — пункт с ним будет выбран * * @return array */ public static function fromLabels(array $labels, string $current): array { $options = []; foreach ($labels as $value => $label) { $options[] = [$label, (string) $value, $current]; } return $options; } }