Skip to content

Commit a6c098a

Browse files
committed
Adjust admin associated resource data for route
1 parent 80cfca6 commit a6c098a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/Entity/Core/Route.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,13 @@ public function setPageData(?AbstractPageData $pageData): self
202202
}
203203

204204
#[Groups(['Route:cwa_resource:read:ROLE_ADMIN'])]
205-
public function getAssociatedResource()
205+
public function getAssociatedResources()
206206
{
207-
return $this->redirect ?: $this->pageData ?: $this->page;
207+
return [
208+
'redirect' => $this->redirect?->path,
209+
'page' => $this->page?->reference,
210+
'pageData' => $this->pageData->getTitle(),
211+
'pageDataType' => $this->pageData ? get_class($this->pageData) : null
212+
];
208213
}
209214
}

0 commit comments

Comments
 (0)