Skip to content

Commit aab0787

Browse files
committed
TASK: Add NodeObjectInterface to generated php classes
1 parent 0d1a3c3 commit aab0787

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
namespace PackageFactory\NodeTypeObjects\Domain;
4+
5+
use Neos\ContentRepository\Domain\Model\NodeInterface;
6+
7+
interface NodeTypeObjectInterface
8+
{
9+
public static function fromNode(NodeInterface $node): self;
10+
}

Classes/Domain/NodeTypeObjectSpecification.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,17 @@ public function toPhpClassString(): ?string
5555
}
5656
}
5757

58+
$interfaceNames[] = '\\' . NodeTypeObjectInterface::class;
59+
5860
if (count($interfaceNames) > 0) {
5961
$interfaceDeclaration = 'implements ' . implode(', ', $interfaceNames);
6062
} else {
6163
$interfaceDeclaration = '';
6264
}
6365

6466

67+
68+
6569
$class = <<<EOL
6670
<?php
6771

0 commit comments

Comments
 (0)