Skip to content
This repository has been archived by the owner on Jan 11, 2021. It is now read-only.

Commit

Permalink
Merge pull request #48 from blankse/EZP-26831
Browse files Browse the repository at this point in the history
EZP-26831 Make newContentCreateStruct respect ContentType defaultAlwaysAvailable
  • Loading branch information
emodric authored Jan 27, 2017
2 parents 2b4686f + d366306 commit bbe72f7
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions eZ/Publish/API/Repository/ContentService.php
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,8 @@ public function loadTranslationInfos( ContentInfo $contentInfo, array $filter =
/**
* Instantiates a new content create struct object
*
* alwaysAvailable is set to the ContentType's defaultAlwaysAvailable
*
* @param \eZ\Publish\API\Repository\Values\ContentType\ContentType $contentType
* @param string $mainLanguageCode
*
Expand Down
2 changes: 2 additions & 0 deletions eZ/Publish/Core/REST/Client/ContentService.php
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,8 @@ public function deleteRelation( VersionInfo $sourceVersion, ContentInfo $destina
/**
* Instantiates a new content create struct object
*
* alwaysAvailable is set to the ContentType's defaultAlwaysAvailable
*
* @param \eZ\Publish\API\Repository\Values\ContentType\ContentType $contentType
* @param string $mainLanguageCode
*
Expand Down
5 changes: 4 additions & 1 deletion eZ/Publish/Core/Repository/ContentService.php
Original file line number Diff line number Diff line change
Expand Up @@ -1986,6 +1986,8 @@ public function loadTranslationInfos( ContentInfo $contentInfo, array $filter =
/**
* Instantiates a new content create struct object
*
* alwaysAvailable is set to the ContentType's defaultAlwaysAvailable
*
* @param \eZ\Publish\API\Repository\Values\ContentType\ContentType $contentType
* @param string $mainLanguageCode
*
Expand All @@ -1996,7 +1998,8 @@ public function newContentCreateStruct( ContentType $contentType, $mainLanguageC
return new ContentCreateStruct(
array(
"contentType" => $contentType,
"mainLanguageCode" => $mainLanguageCode
"mainLanguageCode" => $mainLanguageCode,
'alwaysAvailable' => $contentType->defaultAlwaysAvailable
)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ public function testNewContentCreateStructValues( array $data )
"contentType" => $contentType,
"sectionId" => null,
"ownerId" => null,
"alwaysAvailable" => null,
"alwaysAvailable" => $contentType->defaultAlwaysAvailable,
"remoteId" => null,
"mainLanguageCode" => "eng-GB",
"modificationDate" => null
Expand Down
2 changes: 2 additions & 0 deletions eZ/Publish/Core/SignalSlot/ContentService.php
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,8 @@ public function loadTranslationInfos( ContentInfo $contentInfo, array $filter =
/**
* Instantiates a new content create struct object
*
* alwaysAvailable is set to the ContentType's defaultAlwaysAvailable
*
* @param \eZ\Publish\API\Repository\Values\ContentType\ContentType $contentType
* @param string $mainLanguageCode
*
Expand Down

0 comments on commit bbe72f7

Please sign in to comment.