Missing ControllerProvider in Application and error in private method

This commit is contained in:
Benoît Burnichon
2015-04-13 19:49:55 +02:00
parent 27f1f98dbe
commit e90687e4ff
2 changed files with 4 additions and 4 deletions

View File

@@ -312,6 +312,7 @@ class Application extends SilexApplication
'Alchemy\Phrasea\ControllerProvider\Admin\SearchEngine' => [],
'Alchemy\Phrasea\ControllerProvider\Admin\Setup' => [],
'Alchemy\Phrasea\ControllerProvider\Admin\Subdefs' => [],
'Alchemy\Phrasea\ControllerProvider\Admin\TaskManager' => [],
'Alchemy\Phrasea\ControllerProvider\Admin\Users' => [],
'Alchemy\Phrasea\ControllerProvider\Datafiles' => [],
'Alchemy\Phrasea\ControllerProvider\Lightbox' => [],
@@ -622,8 +623,6 @@ class Application extends SilexApplication
$this->mount('/login/', new Login());
$this->mount('/developers/', new Developers());
$this->mount('/admin/task-manager', new TaskManager());
$this->mount('/client/', new ClientRoot());
$this->mount('/prod/query/', new Query());
@@ -676,6 +675,7 @@ class Application extends SilexApplication
'/admin/search-engine' => 'Alchemy\Phrasea\ControllerProvider\Admin\SearchEngine',
'/admin/setup' => 'Alchemy\Phrasea\ControllerProvider\Admin\Setup',
'/admin/subdefs' => 'Alchemy\Phrasea\ControllerProvider\Admin\Subdefs',
'/admin/task-manager' => 'Alchemy\Phrasea\ControllerProvider\Admin\TaskManager',
'/admin/users' => 'Alchemy\Phrasea\ControllerProvider\Admin\Users',
'/datafiles' => 'Alchemy\Phrasea\ControllerProvider\Datafiles',
'/include/minify' => 'Alchemy\Phrasea\ControllerProvider\Minifier',

View File

@@ -140,7 +140,7 @@ class TaskManagerController extends Controller
if ($request->getRequestFormat() === "json") {
foreach ($tasks as $k => $task) {
$tasks[$k]['urls'] = $this->getTaskResourceUrls($this->app, $task['id']);
$tasks[$k]['urls'] = $this->getTaskResourceUrls($task['id']);
}
return $this->app->json($tasks);
@@ -298,7 +298,7 @@ class TaskManagerController extends Controller
return $this->app->json(array_replace([
'id' => $task->getId(),
'name' => $task->getName(),
'urls' => $this->getTaskResourceUrls($this->app, $task->getId())
'urls' => $this->getTaskResourceUrls($task->getId())
],
$this->getLiveInformationRequest()->getTask($task)
));