getConfig(); dump($config); $configs = [ 'transmission' => [ ['name' => 'transmission_url', 'type' => TextType::class], ['name' => 'transmission_port', 'type' => NumberType::class], ['name' => 'transmission_username', 'type' => TextType::class], ['name' => 'transmission_password', 'type' => TextType::class], ['name' => 'transmission_path_local', 'type' => TextType::class], ['name' => 'transmission_path_remote', 'type' => TextType::class], ], 'animerss' => [ ['name' => 'animerss_apikey', 'type' => TextType::class], ['name' => 'animerss_baseurl', 'type' => TextType::class], ], 'misc' => [ ['name' => 'rss_url', 'type' => TextType::class], ['name' => 'torrent_quality', 'type' => TextType::class], ], 'all' => [], // Placeholder, lists all above values, it is captured a bit later ]; // Handle all special cases for the name /*if ('list' === $name) { // List all the categories $routes = []; foreach ($configs as $key => $config) { $routes[] = ['route' => 'parameters', 'params' => ['name' => $key], 'title' => $key]; } return $this->render('list.routes.twig', ['routes' => $routes]); } else*/if ('all' === $name) { // Show all parameters from all categories $allConfigs = []; foreach ($configs as $config) { $allConfigs = array_merge($allConfigs, $config); } return parent::baseIndex($param, $request, $allConfigs); } else { // Show the parameters from one category return parent::baseIndex($param, $request, $configs[$name]); } } }