Skip to content

Commit 3c1235d

Browse files
committed
feat: refactoring
1 parent 75316ca commit 3c1235d

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

components/ImportExportBundle/src/lib/Writer/Ibexa/Content/IbexaContentData.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class IbexaContentData
1919
protected array $parentLocationIdList = [2];
2020
protected ?int $sectionId = null;
2121
protected int|null|DateTime $modificationDate = null;
22+
protected bool $hidden = false;
2223

2324
public function getContentRemoteId(): string
2425
{
@@ -111,4 +112,14 @@ public function setModificationDate(DateTime|int|null $modificationDate): void
111112
{
112113
$this->modificationDate = $modificationDate;
113114
}
115+
116+
public function isHidden(): bool
117+
{
118+
return $this->hidden;
119+
}
120+
121+
public function setHidden(bool $hidden): void
122+
{
123+
$this->hidden = $hidden;
124+
}
114125
}

components/ImportExportBundle/src/lib/Writer/Ibexa/Content/IbexaContentImporter.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ public function __invoke(IbexaContentData $contentData, bool $allowUpdate = true
5252
$contentData->getFields(),
5353
$contentData->getParentLocationIdList(),
5454
$ownerId,
55-
$contentData->getMainLanguageCode()
55+
$contentData->getMainLanguageCode(),
56+
$contentData->isHidden()
5657
);
5758
} catch (NotFoundException $exception) {
5859
return ($this->contentCreator)(
@@ -63,7 +64,8 @@ public function __invoke(IbexaContentData $contentData, bool $allowUpdate = true
6364
$ownerId,
6465
$contentData->getMainLanguageCode(),
6566
$contentData->getSectionId(),
66-
$contentData->getModificationDate()
67+
$contentData->getModificationDate(),
68+
$contentData->isHidden()
6769
);
6870
}
6971
} catch (\Throwable $exception) {

0 commit comments

Comments
 (0)