Skip to content

Commit

Permalink
Add doc comments to NodeHelper
Browse files Browse the repository at this point in the history
  • Loading branch information
bwaidelich committed Apr 26, 2019
1 parent 91e26f3 commit d490734
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion Classes/Fusion/Helper/NodeHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,22 @@
use Neos\ContentRepository\Domain\Model\NodeInterface;
use Neos\Eel\ProtectedContextAwareInterface;

/**
* Custom Eel Helper for node related functions
*/
class NodeHelper implements ProtectedContextAwareInterface
{

public function mergeProperties(array $properties, NodeInterface $node)
/**
* Merge properties of the specified $node to the given $properties (with precedence to node properties)
*
* Note: This is required since NodeInterface::getProperties() does no longer return an array but an instance of PropertyCollectionInterface
*
* @param array $properties
* @param NodeInterface $node
* @return array
*/
public function mergeProperties(array $properties, NodeInterface $node): array
{
$nodeProperties = $node->getProperties();
if ($nodeProperties instanceof \Traversable) {
Expand Down

0 comments on commit d490734

Please sign in to comment.