Skip to content

Commit

Permalink
[TASK] Replace ConfigurationManager->getContentObject for v13
Browse files Browse the repository at this point in the history
  • Loading branch information
bnf committed Oct 17, 2024
1 parent b5b5d54 commit f6c0945
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Classes/Controller/PostController.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ protected function initializeView($view): void
$this->view->assign('feed', $feedData);
}

$contentObject = $this->configurationManager->getContentObject();
$contentObject = $this->request->getAttribute('currentContentObject');
$this->view->assign('data', $contentObject !== null ? $contentObject->data : null);
}

Expand Down Expand Up @@ -185,7 +185,7 @@ public function listPostsByDateAction(?int $year = null, ?int $month = null, int
public function listPostsByCategoryAction(?Category $category = null, int $currentPage = 1): ResponseInterface
{
if ($category === null) {
$contentObject = $this->configurationManager->getContentObject();
$contentObject = $this->request->getAttribute('currentContentObject');
$referenceUid = $contentObject !== null ? (int) $contentObject->data['uid'] : null;
if ($referenceUid !== null) {
$categories = $this->categoryRepository->getByReference('tt_content', $referenceUid);
Expand Down

0 comments on commit f6c0945

Please sign in to comment.