TYPO3 - 带有 QueryBuilder 的 Extbase 自定义查询:如何将动作显示添加到 url 以使链接再次工作

TYPO3 - Extbase Custom query w/ QueryBuilder: How to add action show to url for links to work again

当 运行 我查询时...我的列表视图中的链接中没有显示操作...它们不再起作用:

Controller.php

$uid = 10;
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tt_content');
$statement = $queryBuilder  
    ->select('uid', 'pid', 'header')            
    ->from('tt_content')
    ->where(
       $queryBuilder->expr()->eq('uid', $uid)
    )           
    ->execute();    
while ($row = $statement->fetchAll()) {
    $this->view->assign('inet', $row);
}

控制台:

<tr id="2">
    <td>2</td>
    <td class="name"><a href="code/?tx_code_code%5Brecord%5D%5Buid%5D=2&amp;tx_code_code%5Brecord%5D%5Bcode%5D=25490004X&amp;tx_code_code%5Brecord%5D%5Bname%5D=Company%20Name%20Inc&amp;cHash=e8e3573028618746234">Company Name Inc</a></td>
</tr>

当我调试它时,我可以看到我渲染了以下数组:

array(20 items)
   0 => array(3 items)
      uid => 1 (integer)
      code => '213800' (6 chars)
      name => 'Company Name Inc' (16 chars)

我怎样才能让链接重新生效?

改变

<f:link.action action="show" pageUid="43" arguments="{record:record}">{record.name}</f:link.action>

<f:link.action action="show" pageUid="43" arguments="{record:record.uid}">{record.name}</f:link.action>

因为您不再获取对象而是数据库行数组。 此外,您的 listAction 缺少参数 $minUid 和 $maxUid。