Skip to content

IBX-9855: Added isHidden property to ContentTree Node #1675

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/lib/REST/Output/ValueObjectVisitor/ContentTree/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ public function visit(Visitor $visitor, Generator $generator, $data)
$generator->startValueElement('isInvisible', $generator->serializeBool($data->isInvisible));
$generator->endValueElement('isInvisible');

$generator->valueElement('isHidden', $generator->serializeBool($data->isHidden));

$generator->startValueElement('displayLimit', $data->displayLimit);
$generator->endValueElement('displayLimit');

Expand Down
4 changes: 4 additions & 0 deletions src/lib/REST/Value/ContentTree/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ class Node extends RestValue
/** @var bool */
public $isInvisible;

public bool $isHidden;

/** @var int */
public $displayLimit;

Expand Down Expand Up @@ -64,6 +66,7 @@ public function __construct(
string $contentTypeIdentifier,
bool $isContainer,
bool $isInvisible,
bool $isHidden,
int $displayLimit,
int $totalChildrenCount,
int $reverseRelationsCount,
Expand All @@ -78,6 +81,7 @@ public function __construct(
$this->versionNo = $versionNo;
$this->name = $name;
$this->isInvisible = $isInvisible;
$this->isHidden = $isHidden;
$this->contentTypeIdentifier = $contentTypeIdentifier;
$this->isContainer = $isContainer;
$this->totalChildrenCount = $totalChildrenCount;
Expand Down
4 changes: 2 additions & 2 deletions src/lib/UI/Module/ContentTree/NodeFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
use Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException;
use Ibexa\Contracts\Core\Repository\PermissionResolver;
use Ibexa\Contracts\Core\Repository\SearchService;
use Ibexa\Contracts\Core\Repository\Values\Content\Content;
use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo;
use Ibexa\Contracts\Core\Repository\Values\Content\Location;
use Ibexa\Contracts\Core\Repository\Values\Content\LocationQuery;
Expand Down Expand Up @@ -396,7 +395,8 @@ private function buildNode(
'', // node name will be provided later by `supplyTranslatedContentName` method
null !== $contentType ? $contentType->getIdentifier() : '',
null === $contentType || $contentType->isContainer(),
$location->isInvisible() || $location->isHidden(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't that behavior change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$location->isInvisible(),
$location->isHidden(),
$limit,
$totalChildrenCount,
$this->getReverseRelationsCount($contentInfo),
Expand Down
2 changes: 2 additions & 0 deletions tests/integration/Resources/REST/Schemas/ContentTreeNode.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<xs:element type="xs:string" name="contentTypeIdentifier"/>
<xs:element type="xs:boolean" name="isContainer"/>
<xs:element type="xs:string" name="isInvisible"/>
<xs:element type="xs:string" name="isHidden"/>
<xs:element type="xs:integer" name="displayLimit"/>
<xs:element type="xs:integer" name="totalChildrenCount"/>
<xs:element type="xs:integer" name="reverseRelationsCount"/>
Expand All @@ -28,6 +29,7 @@
<xs:element type="xs:string" name="contentTypeIdentifier"/>
<xs:element type="xs:boolean" name="isContainer"/>
<xs:element type="xs:string" name="isInvisible"/>
<xs:element type="xs:string" name="isHidden"/>
<xs:element type="xs:integer" name="displayLimit"/>
<xs:element type="xs:integer" name="totalChildrenCount"/>
<xs:element type="xs:integer" name="reverseRelationsCount"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"displayLimit": 30,
"isBookmarked": false,
"isContainer": true,
"isHidden": false,
"isInvisible": false,
"locationId": 2,
"mainLanguageCode": "eng-GB",
Expand All @@ -27,6 +28,7 @@
"displayLimit": 30,
"isBookmarked": false,
"isContainer": true,
"isHidden": false,
"isInvisible": false,
"locationId": 43,
"mainLanguageCode": "eng-US",
Expand All @@ -44,6 +46,7 @@
"displayLimit": 30,
"isBookmarked": false,
"isContainer": true,
"isHidden": false,
"isInvisible": false,
"locationId": 48,
"mainLanguageCode": "eng-US",
Expand All @@ -61,6 +64,7 @@
"displayLimit": 30,
"isBookmarked": false,
"isContainer": true,
"isHidden": false,
"isInvisible": false,
"locationId": 58,
"mainLanguageCode": "eng-US",
Expand All @@ -76,6 +80,7 @@
"displayLimit": 10,
"isBookmarked": false,
"isContainer": true,
"isHidden": false,
"isInvisible": false,
"locationId": 1,
"mainLanguageCode": "eng-GB",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"displayLimit": 30,
"isBookmarked": false,
"isContainer": true,
"isHidden": false,
"isInvisible": false,
"locationId": 43,
"mainLanguageCode": "eng-US",
Expand All @@ -25,6 +26,7 @@
"displayLimit": 10,
"isBookmarked": false,
"isContainer": true,
"isHidden": false,
"isInvisible": false,
"locationId": 1,
"mainLanguageCode": "eng-GB",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"displayLimit": 30,
"isBookmarked": false,
"isContainer": true,
"isHidden": false,
"isInvisible": false,
"locationId": 43,
"mainLanguageCode": "eng-US",
Expand All @@ -27,6 +28,7 @@
"displayLimit": 30,
"isBookmarked": false,
"isContainer": true,
"isHidden": false,
"isInvisible": false,
"locationId": 48,
"mainLanguageCode": "eng-US",
Expand All @@ -44,6 +46,7 @@
"displayLimit": 30,
"isBookmarked": true,
"isContainer": true,
"isHidden": false,
"isInvisible": false,
"locationId": 5,
"mainLanguageCode": "eng-US",
Expand All @@ -61,6 +64,7 @@
"displayLimit": 30,
"isBookmarked": false,
"isContainer": true,
"isHidden": false,
"isInvisible": false,
"locationId": 58,
"mainLanguageCode": "eng-US",
Expand All @@ -76,6 +80,7 @@
"displayLimit": 10,
"isBookmarked": false,
"isContainer": true,
"isHidden": false,
"isInvisible": false,
"locationId": 1,
"mainLanguageCode": "eng-GB",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"displayLimit": 30,
"isBookmarked": false,
"isContainer": true,
"isHidden": false,
"isInvisible": false,
"locationId": 43,
"mainLanguageCode": "eng-US",
Expand All @@ -27,6 +28,7 @@
"displayLimit": 30,
"isBookmarked": false,
"isContainer": true,
"isHidden": false,
"isInvisible": false,
"locationId": 48,
"mainLanguageCode": "eng-US",
Expand All @@ -44,6 +46,7 @@
"displayLimit": 30,
"isBookmarked": false,
"isContainer": true,
"isHidden": false,
"isInvisible": false,
"locationId": 58,
"mainLanguageCode": "eng-US",
Expand All @@ -59,6 +62,7 @@
"displayLimit": 10,
"isBookmarked": false,
"isContainer": true,
"isHidden": false,
"isInvisible": false,
"locationId": 1,
"mainLanguageCode": "eng-GB",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"displayLimit": 30,
"isBookmarked": false,
"isContainer": true,
"isHidden": false,
"isInvisible": false,
"locationId": 2,
"mainLanguageCode": "eng-GB",
Expand All @@ -27,6 +28,7 @@
"displayLimit": 30,
"isBookmarked": false,
"isContainer": true,
"isHidden": false,
"isInvisible": false,
"locationId": 43,
"mainLanguageCode": "eng-US",
Expand All @@ -44,6 +46,7 @@
"displayLimit": 30,
"isBookmarked": false,
"isContainer": true,
"isHidden": false,
"isInvisible": false,
"locationId": 48,
"mainLanguageCode": "eng-US",
Expand All @@ -61,6 +64,7 @@
"displayLimit": 30,
"isBookmarked": true,
"isContainer": true,
"isHidden": false,
"isInvisible": false,
"locationId": 5,
"mainLanguageCode": "eng-US",
Expand All @@ -78,6 +82,7 @@
"displayLimit": 30,
"isBookmarked": false,
"isContainer": true,
"isHidden": false,
"isInvisible": false,
"locationId": 58,
"mainLanguageCode": "eng-US",
Expand All @@ -93,7 +98,8 @@
"displayLimit": 10,
"isBookmarked": false,
"isContainer": true,
"isInvisible": false,
"isHidden": false,
"isInvisible": false,
"locationId": 1,
"mainLanguageCode": "eng-GB",
"name": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<contentTypeIdentifier/>
<isContainer>true</isContainer>
<isInvisible>false</isInvisible>
<isHidden>false</isHidden>
<displayLimit>10</displayLimit>
<totalChildrenCount>5</totalChildrenCount>
<reverseRelationsCount>0</reverseRelationsCount>
Expand All @@ -23,6 +24,7 @@
<contentTypeIdentifier>landing_page</contentTypeIdentifier>
<isContainer>true</isContainer>
<isInvisible>false</isInvisible>
<isHidden>false</isHidden>
<displayLimit>30</displayLimit>
<totalChildrenCount>1</totalChildrenCount>
<reverseRelationsCount>0</reverseRelationsCount>
Expand All @@ -38,6 +40,7 @@
<contentTypeIdentifier>folder</contentTypeIdentifier>
<isContainer>true</isContainer>
<isInvisible>false</isInvisible>
<isHidden>false</isHidden>
<displayLimit>30</displayLimit>
<totalChildrenCount>3</totalChildrenCount>
<reverseRelationsCount>0</reverseRelationsCount>
Expand All @@ -53,6 +56,7 @@
<contentTypeIdentifier>folder</contentTypeIdentifier>
<isContainer>true</isContainer>
<isInvisible>false</isInvisible>
<isHidden>false</isHidden>
<displayLimit>30</displayLimit>
<totalChildrenCount>0</totalChildrenCount>
<reverseRelationsCount>0</reverseRelationsCount>
Expand All @@ -68,6 +72,7 @@
<contentTypeIdentifier>user_group</contentTypeIdentifier>
<isContainer>true</isContainer>
<isInvisible>false</isInvisible>
<isHidden>false</isHidden>
<displayLimit>30</displayLimit>
<totalChildrenCount>5</totalChildrenCount>
<reverseRelationsCount>0</reverseRelationsCount>
Expand All @@ -83,6 +88,7 @@
<contentTypeIdentifier>folder</contentTypeIdentifier>
<isContainer>true</isContainer>
<isInvisible>false</isInvisible>
<isHidden>false</isHidden>
<displayLimit>30</displayLimit>
<totalChildrenCount>0</totalChildrenCount>
<reverseRelationsCount>0</reverseRelationsCount>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"pathString": "/1/2/",
"contentTypeIdentifier": "landing_page",
"isContainer": true,
"isHidden": false,
"isInvisible": false,
"displayLimit": 30,
"totalChildrenCount": 1,
Expand All @@ -28,6 +29,7 @@
"pathString": "/1/2/60/",
"contentTypeIdentifier": "feedback_form",
"isContainer": true,
"isHidden": false,
"isInvisible": false,
"displayLimit": 30,
"totalChildrenCount": 0,
Expand Down
Loading