Skip to content

Commit

Permalink
[BUGFIX] Ignore page restriction of Page Type Collections
Browse files Browse the repository at this point in the history
Fixes: #184
  • Loading branch information
Nikita Hovratov committed Apr 23, 2024
1 parent 5f811fa commit ecae5b2
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@ private function enrichTableDefinition(
$newTableDefinition = $newTableDefinition->withParentReferences($references);
// If root Content Type is a Content Element, allow the external table to be put in standard pages.
foreach ($references as $reference) {
if ($reference->getParentContentType() === ContentType::CONTENT_ELEMENT) {
if (
$reference->getParentContentType() === ContentType::CONTENT_ELEMENT
|| $reference->getParentContentType() === ContentType::PAGE_TYPE
) {
$capability = $newTableDefinition->getCapability();
$capability = $capability->withIgnorePageTypeRestriction(true);
$newTableDefinition = $newTableDefinition->withCapability($capability);
Expand Down

0 comments on commit ecae5b2

Please sign in to comment.