Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit a936899

Browse files
committed
Merge pull request #262 from symfony-cmf/WouterJ/fix-261
Handle content link type correctly
2 parents 3485ba8 + 40c005e commit a936899

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Admin/MenuNodeAdmin.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,12 @@ public function getFormBuilder()
114114

115115
if ($data = $node->getUri()) {
116116
$linkType->setData('uri');
117-
} else {
118-
$data = $node->getRoute();
117+
} elseif ($data = $node->getRoute()) {
119118
$linkType->setData('route');
119+
} elseif ($node->getContent()) {
120+
$linkType->setData('content');
121+
} else {
122+
$linkType->setData('auto');
120123
}
121124

122125
$link->setData($data);

0 commit comments

Comments
 (0)