/** * Renders the content preview of a content element. * * The initial item content is passed as a reference like in the core's * PageLayoutViewDrawItemHookInterface. The implementation has to modify * the content. * * @param PageLayoutView $parentObject Calling parent object * @param string $itemContent Item content * @param array $row Record row of tt_content * * @return void */ public function renderContent(PageLayoutView &$parentObject, &$itemContent, array &$row) { $this->view->assign('section', 'itemContent'); $pageType = Type::fromString($this->getFlexformValue($row['pi_flexform'], 'settings.pageType')); $offset = (int) $this->getFlexformValue($row['pi_flexform'], 'settings.offset'); $limit = (int) $this->getFlexformValue($row['pi_flexform'], 'settings.limit'); $this->view->assign('typeLabelReference', $this->getPageTypeLabelReference($pageType)); $this->view->assign('offset', $offset); $this->view->assign('limit', $limit); $pages = $this->pageRepository->findLastUpdated($pageType, $offset - 1, $limit); $this->view->assign('pages', $pages); $itemContent .= $this->view->render(); }