public function assignNodes(array $nodes)
{
$data = array();
foreach ($nodes as $node) {
if ($node->getPath() !== '/') {
$q = new FlowQuery(array($node));
$closestDocumentNode = $q->closest('[instanceof Neos.Neos:Document]')->get(0);
if ($closestDocumentNode !== null) {
$data[] = array('nodeContextPath' => $node->getContextPath(), 'documentNodeContextPath' => $closestDocumentNode->getContextPath());
} else {
$this->systemLogger->log('You have a node that is no longer connected to a parent. Path: ' . $node->getPath() . ' (Identifier: ' . $node->getIdentifier() . ')');
}
}
}
$this->assign('value', array('data' => $data, 'success' => true));
}