Add categories overview
This commit is contained in:
@ -13,21 +13,21 @@ class ParameterController extends BaseController
|
||||
/**
|
||||
* @Route("/{category}", name="parameter_bundle_parameters")
|
||||
*/
|
||||
public function parameters($category,
|
||||
public function parameters($category = 'categories',
|
||||
ParameterService $param,
|
||||
Request $request)
|
||||
{
|
||||
$configs = $param->getConfig();
|
||||
|
||||
// Handle all special cases for the name
|
||||
/*if ('list' === $name) { // List all the categories
|
||||
$routes = [];
|
||||
if ('categories' === $category) { // List all the categories
|
||||
$categories = [];
|
||||
foreach ($configs as $key => $config) {
|
||||
$routes[] = ['route' => 'parameters', 'params' => ['name' => $key], 'title' => $key];
|
||||
$categories[] = $key;
|
||||
}
|
||||
|
||||
return $this->render('list.routes.twig', ['routes' => $routes]);
|
||||
} else*/if ('all' === $category) { // Show all parameters from all categories
|
||||
$categories[] = 'all';
|
||||
return $this->render('@ArdentParameter/categories.html.twig', ['categories' => $categories]);
|
||||
} elseif ('all' === $category) { // Show all parameters from all categories
|
||||
$allConfigs = [];
|
||||
foreach ($configs as $config) {
|
||||
$allConfigs = array_merge($allConfigs, $config);
|
||||
|
Reference in New Issue
Block a user