Revert "start subdef creation after first write meta"

This reverts commit cfa854f307.
This commit is contained in:
aynsix
2020-02-20 11:11:18 +03:00
parent ed7a5fe288
commit db0489c05e
5 changed files with 14 additions and 64 deletions

View File

@@ -1083,7 +1083,7 @@ class record_adapter implements RecordInterface, cache_cacheableInterface
*
* @return record_adapter
*/
public function set_metadatas(array $metadatas, $force_readonly = false, $isNewRecord = false, $nosubdef = false)
public function set_metadatas(array $metadatas, $force_readonly = false)
{
$databox_descriptionStructure = $this->getDatabox()->get_meta_structure();
@@ -1108,7 +1108,7 @@ class record_adapter implements RecordInterface, cache_cacheableInterface
unset($xml);
$this->write_metas();
$this->dispatch(RecordEvents::METADATA_CHANGED, new MetadataChangedEvent($this, $isNewRecord, $nosubdef));
$this->dispatch(RecordEvents::METADATA_CHANGED, new MetadataChangedEvent($this));
return $this;
}
@@ -1175,16 +1175,6 @@ class record_adapter implements RecordInterface, cache_cacheableInterface
return $this;
}
public function setNoSubdef()
{
$this->getDataboxConnection()->executeUpdate(
'UPDATE record SET work = 1 WHERE record_id= :record_id',
['record_id' => $this->getRecordId()]
);
return $this;
}
private function dispatch($eventName, RecordEvent $event)
{
$this->app['dispatcher']->dispatch($eventName, $event);