diff --git a/src/bundle/Core/Command/CopySubtreeCommand.php b/src/bundle/Core/Command/CopySubtreeCommand.php index 3c1f01c5a6..9febb83ae8 100644 --- a/src/bundle/Core/Command/CopySubtreeCommand.php +++ b/src/bundle/Core/Command/CopySubtreeCommand.php @@ -127,7 +127,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int $targetLocation->getContentInfo()->contentTypeId ); - if (!$targetContentType->isContainer) { + if (!$targetContentType->isContainer()) { throw new InvalidArgumentException( 'target-location-id', 'The selected Location cannot contain children' diff --git a/src/contracts/Repository/Values/ContentType/ContentType.php b/src/contracts/Repository/Values/ContentType/ContentType.php index 997de48c56..964ae784f0 100644 --- a/src/contracts/Repository/Values/ContentType/ContentType.php +++ b/src/contracts/Repository/Values/ContentType/ContentType.php @@ -27,7 +27,6 @@ * @property-read string $remoteId a global unique id of the content object * @property-read string $urlAliasSchema URL alias schema. If nothing is provided, $nameSchema will be used instead. * @property-read string $nameSchema The name schema. - * @property-read bool $isContainer @deprecated use strict getter {@see ContentType::isContainer} instead. * @property-read string $mainLanguageCode the main language of the content type names and description used for fallback. * @property-read bool $defaultAlwaysAvailable if an instance of a content type is created the always available flag is set by default this this value. * @property-read string[] $languageCodes array of language codes used by content type translations. diff --git a/src/contracts/Specification/Content/ContentContainerSpecification.php b/src/contracts/Specification/Content/ContentContainerSpecification.php index 59cb4c03e5..8f7b1cc5b4 100644 --- a/src/contracts/Specification/Content/ContentContainerSpecification.php +++ b/src/contracts/Specification/Content/ContentContainerSpecification.php @@ -14,6 +14,6 @@ final class ContentContainerSpecification implements ContentSpecification { public function isSatisfiedBy(Content $content): bool { - return $content->getContentType()->isContainer; + return $content->getContentType()->isContainer(); } } diff --git a/src/lib/Repository/LocationService.php b/src/lib/Repository/LocationService.php index bf6dc27979..b37a0ac5ed 100644 --- a/src/lib/Repository/LocationService.php +++ b/src/lib/Repository/LocationService.php @@ -688,7 +688,7 @@ public function moveSubtree(APILocation $location, APILocation $newParentLocatio ); } $contentTypeId = $newParentLocation->contentInfo->contentTypeId; - if (!$this->contentTypeService->loadContentType($contentTypeId)->isContainer) { + if (!$this->contentTypeService->loadContentType($contentTypeId)->isContainer()) { throw new InvalidArgumentException( '$newParentLocation', 'Cannot move Location to a parent that is not a container' diff --git a/src/lib/Repository/Mapper/ContentTypeDomainMapper.php b/src/lib/Repository/Mapper/ContentTypeDomainMapper.php index c352b17e99..05dab96cc3 100644 --- a/src/lib/Repository/Mapper/ContentTypeDomainMapper.php +++ b/src/lib/Repository/Mapper/ContentTypeDomainMapper.php @@ -155,7 +155,7 @@ public function buildSPIContentTypeUpdateStruct(APIContentTypeDraft $contentType $updateStruct->isContainer = $contentTypeUpdateStruct->isContainer !== null ? $contentTypeUpdateStruct->isContainer : - $contentTypeDraft->isContainer; + $contentTypeDraft->isContainer(); $updateStruct->sortField = $contentTypeUpdateStruct->defaultSortField !== null ? $contentTypeUpdateStruct->defaultSortField : $contentTypeDraft->defaultSortField; @@ -183,6 +183,7 @@ public function buildContentTypeDraftDomainObject(SPIContentType $spiContentType return new ContentTypeDraft( [ 'innerContentType' => $this->buildContentTypeDomainObject($spiContentType), + 'isContainer' => false, ] ); }