Replace app['phraseanet.appbox']->get_databox using trait

This commit is contained in:
Benoît Burnichon
2015-06-30 11:32:34 +02:00
parent 360e69ff8d
commit 6e651f3b07
75 changed files with 171 additions and 151 deletions

View File

@@ -46,7 +46,7 @@ class databox_cgu
{
$terms = [];
foreach ($app['phraseanet.appbox']->get_databoxes() as $databox) {
foreach ($app->getDataboxes() as $databox) {
try {
$cgus = $databox->get_cgus();

View File

@@ -232,7 +232,7 @@ class databox_field implements cache_cacheableInterface
public function hydrate(Application $app)
{
$this->app = $app;
$this->set_databox($this->app['phraseanet.appbox']->get_databox($this->sbas_id));
$this->set_databox($this->app->findDataboxById($this->sbas_id));
$this->loadVocabulary();
}

View File

@@ -58,7 +58,7 @@ class databox_status
public static function deleteIcon(Application $app, $databox_id, $bit, $switch)
{
$databox = $app['phraseanet.appbox']->get_databox($databox_id);
$databox = $app->findDataboxById($databox_id);
$statusStructure = $app['factory.status-structure']->getStructure($databox);
@@ -88,7 +88,7 @@ class databox_status
public static function updateIcon(Application $app, $databox_id, $bit, $switch, UploadedFile $file)
{
$databox = $app['phraseanet.appbox']->get_databox($databox_id);
$databox = $app->findDataboxById($databox_id);
$statusStructure = $app['factory.status-structure']->getStructure($databox);