src/Kunstmaan/NodeBundle/EventListener/NodeTranslationListener.php 1 location
|
@@ 118-124 (lines=7) @@
|
115 |
|
} |
116 |
|
|
117 |
|
// If no slug is set and no structure node, apply title as slug. |
118 |
|
if ($nodeTranslation->getSlug() === null && $nodeTranslation->getNode()->getParent() !== null) { |
119 |
|
$nodeTranslation->setSlug( |
120 |
|
$this->slugifier->slugify($nodeTranslation->getTitle()) |
121 |
|
); |
122 |
|
} |
123 |
|
} |
124 |
|
|
125 |
|
/** |
126 |
|
* @param NodeTranslation $nodeTranslation |
127 |
|
*/ |
src/Kunstmaan/FixturesBundle/Builder/PageBuilder.php 1 location
|
@@ 109-111 (lines=3) @@
|
106 |
|
|
107 |
|
$this->populator->populate($translationNode, $data); |
108 |
|
$this->populator->populate($page, $data); |
109 |
|
if ($translationNode->getSlug() === null && $rootNode->getParent() !== null) { |
110 |
|
$translationNode->setSlug($this->slugifier->slugify($translationNode->getTitle())); |
111 |
|
} |
112 |
|
$this->ensureUniqueUrl($translationNode, $page); |
113 |
|
|
114 |
|
$this->manager->persist($translationNode); |