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); |
src/Kunstmaan/NodeBundle/EventListener/NodeTranslationListener.php 1 location
|
@@ 103-109 (lines=7) @@
|
100 |
|
} |
101 |
|
|
102 |
|
// If no slug is set and no structure node, apply title as slug. |
103 |
|
if ($nodeTranslation->getSlug() === null && $nodeTranslation->getNode()->getParent() !== null) { |
104 |
|
$nodeTranslation->setSlug( |
105 |
|
$this->slugifier->slugify($nodeTranslation->getTitle()) |
106 |
|
); |
107 |
|
} |
108 |
|
} |
109 |
|
|
110 |
|
private function ensureSlugIsSlugified(NodeTranslation $nodeTranslation) |
111 |
|
{ |
112 |
|
if ($nodeTranslation->getSlug() !== null) { |