mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
buildsubdef with worker
This commit is contained in:
@@ -14,6 +14,8 @@ use Alchemy\Phrasea\Application\Helper\EntityManagerAware;
|
||||
use Alchemy\Phrasea\Controller\Controller;
|
||||
use Alchemy\Phrasea\Controller\RecordsRequest;
|
||||
use Alchemy\Phrasea\Controller\Exception as ControllerException;
|
||||
use Alchemy\Phrasea\Core\Event\Record\RecordEvents;
|
||||
use Alchemy\Phrasea\Core\Event\Record\SubdefinitionBuildEvent;
|
||||
use Alchemy\Phrasea\Core\Event\RecordEdit;
|
||||
use Alchemy\Phrasea\Core\PhraseaEvents;
|
||||
use Alchemy\Phrasea\Model\Entities\StoryWZ;
|
||||
@@ -68,7 +70,9 @@ class StoryController extends Controller
|
||||
break;
|
||||
}
|
||||
|
||||
$story->set_metadatas($metadatas)->rebuild_subdefs();
|
||||
$recordAdapter = $story->set_metadatas($metadatas);
|
||||
// tell phraseanet to rebuild subdef
|
||||
$this->dispatch(RecordEvents::SUBDEFINITION_BUILD, new SubdefinitionBuildEvent($recordAdapter));
|
||||
|
||||
$storyWZ = new StoryWZ();
|
||||
$storyWZ->setUser($this->getAuthenticatedUser());
|
||||
|
@@ -16,6 +16,7 @@ use Alchemy\Phrasea\Application\Helper\SubDefinitionSubstituerAware;
|
||||
use Alchemy\Phrasea\Controller\Controller;
|
||||
use Alchemy\Phrasea\Controller\RecordsRequest;
|
||||
use Alchemy\Phrasea\Core\Event\Record\RecordEvents;
|
||||
use Alchemy\Phrasea\Core\Event\Record\SubdefinitionBuildEvent;
|
||||
use Alchemy\Phrasea\Exception\RuntimeException;
|
||||
use Alchemy\Phrasea\Metadata\PhraseanetMetadataReader;
|
||||
use Alchemy\Phrasea\Metadata\PhraseanetMetadataSetter;
|
||||
@@ -156,7 +157,7 @@ class ToolsController extends Controller
|
||||
}
|
||||
|
||||
if (!$substituted || $force) {
|
||||
$record->rebuild_subdefs();
|
||||
$this->dispatch(RecordEvents::SUBDEFINITION_BUILD, new SubdefinitionBuildEvent($record));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user