-
-
Notifications
You must be signed in to change notification settings - Fork 219
/
TransformationInterface.php
40 lines (36 loc) · 1.1 KB
/
TransformationInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
namespace Neos\ContentRepository\Migration\Transformations;
/*
* This file is part of the Neos.ContentRepository package.
*
* (c) Contributors of the Neos Project - www.neos.io
*
* This package is Open Source Software. For the full copyright and license
* information, please view the LICENSE file which was distributed with this
* source code.
*/
use Neos\ContentRepository\Domain\Model\NodeData;
/**
* Transformation are used to change nodes as needed. They may do anything to a node
* in the execute() method and will be asked if they can transform a node through a
* call to isTransformable().
*
* Settings given to a transformation will be passed to accordingly named setters.
*/
interface TransformationInterface
{
/**
* Returns true if the given node can be transformed by this transformation.
*
* @param NodeData $node
* @return boolean
*/
public function isTransformable(NodeData $node);
/**
* Execute the transformation on the given node.
*
* @param NodeData $node
* @return NodeData
*/
public function execute(NodeData $node);
}