mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 23:13:15 +00:00
Use SubDefinitionSubstituerAware in some Controllers
This commit is contained in:
@@ -11,6 +11,7 @@ namespace Alchemy\Phrasea\Controller\Prod;
|
||||
|
||||
use Alchemy\Phrasea\Application\Helper\DataboxLoggerAware;
|
||||
use Alchemy\Phrasea\Application\Helper\DispatcherAware;
|
||||
use Alchemy\Phrasea\Application\Helper\SubDefinitionSubstituerAware;
|
||||
use Alchemy\Phrasea\Controller\Controller;
|
||||
use Alchemy\Phrasea\Controller\RecordsRequest;
|
||||
use Alchemy\Phrasea\Core\Event\RecordEdit;
|
||||
@@ -23,6 +24,7 @@ class EditController extends Controller
|
||||
{
|
||||
use DataboxLoggerAware;
|
||||
use DispatcherAware;
|
||||
use SubDefinitionSubstituerAware;
|
||||
|
||||
public function submitAction(Request $request)
|
||||
{
|
||||
@@ -373,12 +375,4 @@ class EditController extends Controller
|
||||
|
||||
return $this->app->json(['success' => true]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return SubdefSubstituer
|
||||
*/
|
||||
private function getSubDefinitionSubstituer()
|
||||
{
|
||||
return $this->app['subdef.substituer'];
|
||||
}
|
||||
}
|
||||
|
@@ -14,6 +14,7 @@ use Alchemy\Phrasea\Application\Helper\DataboxLoggerAware;
|
||||
use Alchemy\Phrasea\Application\Helper\DelivererAware;
|
||||
use Alchemy\Phrasea\Application\Helper\EntityManagerAware;
|
||||
use Alchemy\Phrasea\Application\Helper\FilesystemAware;
|
||||
use Alchemy\Phrasea\Application\Helper\SubDefinitionSubstituerAware;
|
||||
use Alchemy\Phrasea\Border;
|
||||
use Alchemy\Phrasea\Border\Attribute\AttributeInterface;
|
||||
use Alchemy\Phrasea\Controller\Controller;
|
||||
@@ -32,6 +33,7 @@ class LazaretController extends Controller
|
||||
use DelivererAware;
|
||||
use EntityManagerAware;
|
||||
use FilesystemAware;
|
||||
use SubDefinitionSubstituerAware;
|
||||
|
||||
/**
|
||||
* List all elements in lazaret
|
||||
@@ -460,12 +462,4 @@ class LazaretController extends Controller
|
||||
{
|
||||
return $this->app['border-manager'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return SubdefSubstituer
|
||||
*/
|
||||
private function getSubDefinitionSubstituer()
|
||||
{
|
||||
return $this->app['subdef.substituer'];
|
||||
}
|
||||
}
|
||||
|
@@ -11,6 +11,7 @@ namespace Alchemy\Phrasea\Controller\Prod;
|
||||
|
||||
use Alchemy\Phrasea\Application\Helper\DataboxLoggerAware;
|
||||
use Alchemy\Phrasea\Application\Helper\FilesystemAware;
|
||||
use Alchemy\Phrasea\Application\Helper\SubDefinitionSubstituerAware;
|
||||
use Alchemy\Phrasea\Controller\Controller;
|
||||
use Alchemy\Phrasea\Controller\RecordsRequest;
|
||||
use Alchemy\Phrasea\Exception\RuntimeException;
|
||||
@@ -28,6 +29,7 @@ class ToolsController extends Controller
|
||||
{
|
||||
use DataboxLoggerAware;
|
||||
use FilesystemAware;
|
||||
use SubDefinitionSubstituerAware;
|
||||
|
||||
public function indexAction(Request $request)
|
||||
{
|
||||
@@ -297,14 +299,6 @@ class ToolsController extends Controller
|
||||
return $this->app['mediavorus'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return SubdefSubstituer
|
||||
*/
|
||||
private function getSubDefinitionSubstituer()
|
||||
{
|
||||
return $this->app['subdef.substituer'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return PhraseanetMetadataSetter
|
||||
*/
|
||||
|
@@ -27,7 +27,11 @@ class Edit implements ControllerProviderInterface, ServiceProviderInterface
|
||||
$app['controller.prod.edit'] = $app->share(function (PhraseaApplication $app) {
|
||||
return (new EditController($app))
|
||||
->setDataboxLoggerLocator($app['phraseanet.logger'])
|
||||
->setDispatcher($app['dispatcher']);
|
||||
->setDispatcher($app['dispatcher'])
|
||||
->setSubDefinitionSubstituerLocator(function () use ($app) {
|
||||
return $app['subdef.substituer'];
|
||||
})
|
||||
;
|
||||
});
|
||||
}
|
||||
|
||||
|
@@ -35,7 +35,11 @@ class Lazaret implements ControllerProviderInterface, ServiceProviderInterface
|
||||
})
|
||||
->setFileSystemLocator(function () use ($app) {
|
||||
return $app['filesystem'];
|
||||
});
|
||||
})
|
||||
->setSubDefinitionSubstituerLocator(function () use ($app) {
|
||||
return $app['subdef.substituer'];
|
||||
})
|
||||
;
|
||||
});
|
||||
}
|
||||
|
||||
|
@@ -30,6 +30,9 @@ class Tools implements ControllerProviderInterface, ServiceProviderInterface
|
||||
->setFileSystemLocator(function () use ($app) {
|
||||
return $app['filesystem'];
|
||||
})
|
||||
->setSubDefinitionSubstituerLocator(function () use ($app) {
|
||||
return $app['subdef.substituer'];
|
||||
})
|
||||
;
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user