-
-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TASK: Introduce
ContentStreamAwareNodeBuilder
to simplify creating …
…`ContentStreamAwareNode`
- Loading branch information
Showing
6 changed files
with
74 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...y.TestSuite/Classes/Behavior/Features/Bootstrap/Helpers/ContentStreamAwareNodeBuilder.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Neos\ContentRepository\TestSuite\Behavior\Features\Bootstrap\Helpers; | ||
|
||
use Neos\ContentRepository\Core\Projection\ContentGraph\Node; | ||
use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; | ||
|
||
final readonly class ContentStreamAwareNodeBuilder | ||
{ | ||
private function __construct( | ||
private ContentStreamId $contentStreamId | ||
) { | ||
} | ||
|
||
public static function create(ContentStreamId $contentStreamId): self | ||
{ | ||
return new self($contentStreamId); | ||
} | ||
|
||
public function buildNode(Node $node): ContentStreamAwareNode | ||
{ | ||
return ContentStreamAwareNode::create($this->contentStreamId, $node); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.