我的内容树 n sulu 1.0.13 中有两页。在页面“A”上,我使用内容类型“单个内部链接”的字段设置了对页面“B”的引用。
当我在页面“B”上时,我想获得引用页面“A”。我在控制器中尝试了以下代码:
$dm = $this->get('sulu_document_manager.document_manager');
$doc = $dm->find('992758cf-1da4-4e45-9ee4-ca9c4ec3998e'); // UUID of page "B"
$di = $this->get('sulu_document_manager.document_inspector');
$node = $di->getNode($doc);
$refs = $di->getReferrers($doc); // $refs is an empty collection
$refs = $node->getReferences(); // $refs is an empty collection
$refs = $node->getWeakReferences(); // $refs is an empty collection
$refs 始终是一个空集合。
获取引荐页面的正确方法是什么?
更新:我现在使用版本 1.1.0 RC2