Permalink
Browse files

Merge pull request #172 from datafactory/fix_set_content_type_group

Fix: ContentTypeManager::setContentTypeGroup/unsetContentTypeGroup usage
  • Loading branch information...
gggeek committed Sep 13, 2018
2 parents 4fd5be1 + 619352a commit a2595a91f45f180acde36e0e7f2d642629b9dcce
Showing with 8 additions and 8 deletions.
  1. +8 −8 Core/Executor/ContentTypeManager.php
@@ -201,14 +201,6 @@ protected function update($step)
$contentTypeUpdateStruct->defaultSortOrder = $this->sortConverter->hash2SortOrder($step->dsl['default_sort_order']);
}
if (isset($step->dsl['content_type_group'])) {
$this->setContentTypeGroup($contentType, $step->dsl['content_type_group']);
}
if (isset($step->dsl['remove_content_type_group'])) {
$this->unsetContentTypeGroup($contentType, $step->dsl['remove_content_type_group']);
}
// Add/edit attributes
if (isset($step->dsl['attributes'])) {
// NB: seems like eZ gets mixed up if we pass some attributes with a position and some without...
@@ -287,6 +279,14 @@ protected function update($step)
$contentTypeService->updateContentTypeDraft($contentTypeDraft, $contentTypeUpdateStruct);
$contentTypeService->publishContentTypeDraft($contentTypeDraft);
if (isset($step->dsl['content_type_group'])) {
$this->setContentTypeGroup($contentType, $step->dsl['content_type_group']);
}
if (isset($step->dsl['remove_content_type_group'])) {
$this->unsetContentTypeGroup($contentType, $step->dsl['remove_content_type_group']);
}
// Set references
if ($newIdentifier !== null) {
$contentType = $contentTypeService->loadContentTypeByIdentifier($newIdentifier);

0 comments on commit a2595a9

Please sign in to comment.