Neos\Neos\TYPO3CR\Transformations\PluginViewTransformation::execute PHP Method

execute() public method

Change the property on the given node.
public execute ( NodeData $node ) : NodeData
$node Neos\ContentRepository\Domain\Model\NodeData
return Neos\ContentRepository\Domain\Model\NodeData
    public function execute(NodeData $node)
    {
        $reference = (string) $node->getProperty('plugin');
        $workspace = $node->getWorkspace();
        do {
            if ($this->reverse === false && preg_match(NodeInterface::MATCH_PATTERN_PATH, $reference)) {
                $pluginNode = $this->nodeDataRepository->findOneByPath($reference, $node->getWorkspace());
            } else {
                $pluginNode = $this->nodeDataRepository->findOneByIdentifier($reference, $node->getWorkspace());
            }
            if (isset($pluginNode)) {
                break;
            }
            $workspace = $workspace->getBaseWorkspace();
        } while ($workspace && $workspace->getName() !== 'live');
        if (isset($pluginNode)) {
            $node->setProperty('plugin', $this->reverse === false ? $pluginNode->getIdentifier() : $pluginNode->getPath());
        }
        return $node;
    }
PluginViewTransformation