CategoriesController.php
8 years ago
ExportController.php
4 years ago
GoogleCategoriesController.php
8 years ago
SchedulingConnectionController.php
8 years ago
SchedulingLicenseController.php
7 years ago
CategoriesController.php
24 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Wpae\App\Controller; |
| 4 | |
| 5 | use Wpae\App\Service\CategoriesService; |
| 6 | use Wpae\Controller\BaseController; |
| 7 | use Wpae\Http\JsonResponse; |
| 8 | use Wpae\Http\Request; |
| 9 | |
| 10 | class CategoriesController extends BaseController |
| 11 | { |
| 12 | public function indexAction(Request $request) |
| 13 | { |
| 14 | $categoriesService = new CategoriesService(); |
| 15 | |
| 16 | $categories = array( |
| 17 | 'id' => 0, |
| 18 | 'title' => 'Root', |
| 19 | 'children' => $categoriesService->getTaxonomyHierarchy(0) |
| 20 | ); |
| 21 | |
| 22 | return new JsonResponse($categories); |
| 23 | } |
| 24 | } |