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

Commit c19a2b2

Browse files
committed
Update PHPCR-ODM adapter.
1 parent d886754 commit c19a2b2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Adapter/PhpcrOdmAdapter.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public function removeAutoRoute(AutoRouteInterface $autoRoute)
109109
/**
110110
* {@inheritdoc}
111111
*/
112-
public function createAutoRoute(UriContext $uriContext, $contentDocument, $autoRouteTag)
112+
public function createAutoRoute(UriContext $uriContext, $contentDocument, $locale)
113113
{
114114
$basePath = $this->baseRoutePath;
115115
$document = $parentDocument = $this->dm->find(null, $basePath);
@@ -142,7 +142,7 @@ public function createAutoRoute(UriContext $uriContext, $contentDocument, $autoR
142142
return $this->migrateGenericToAutoRoute(
143143
$existingDocument,
144144
$contentDocument,
145-
$autoRouteTag,
145+
$locale,
146146
AutoRouteInterface::TYPE_PRIMARY
147147
);
148148
}
@@ -161,7 +161,7 @@ public function createAutoRoute(UriContext $uriContext, $contentDocument, $autoR
161161
$headRoute->setContent($contentDocument);
162162
$headRoute->setName($headName);
163163
$headRoute->setParentDocument($document);
164-
$headRoute->setAutoRouteTag($autoRouteTag);
164+
$headRoute->setLocale($locale);
165165
$headRoute->setType(AutoRouteInterface::TYPE_PRIMARY);
166166

167167
foreach ($uriContext->getDefaults() as $key => $value) {
@@ -229,12 +229,12 @@ private function getPathFromUri($uri)
229229
*
230230
* @param Generic $document
231231
* @param object $contentDocument
232-
* @param string $autoRouteTag
232+
* @param string $locale
233233
* @param string $routeType
234234
*
235235
* @return AutoRouteInterface
236236
*/
237-
private function migrateGenericToAutoRoute(Generic $document, $contentDocument, $autoRouteTag, $routeType)
237+
private function migrateGenericToAutoRoute(Generic $document, $contentDocument, $locale, $routeType)
238238
{
239239
$autoRouteClassName = $this->autoRouteFqcn;
240240
$mapper = $this->dm->getConfiguration()->getDocumentClassMapper();
@@ -256,7 +256,7 @@ private function migrateGenericToAutoRoute(Generic $document, $contentDocument,
256256
}
257257

258258
$autoRoute->setContent($contentDocument);
259-
$autoRoute->setAutoRouteTag($autoRouteTag);
259+
$autoRoute->setLocale($locale);
260260
$autoRoute->setType($routeType);
261261

262262
return $autoRoute;

0 commit comments

Comments
 (0)