这是T3 v6.2.36,我有一个带有子页面的登录页面。 子页面仅限于登录用户,因此登录前不会出现在菜单中。 当我单击菜单中的登录页面并输入凭据时,我不会重定向到该子页面。 我已经在用户组中设置了重定向目标页面。 另外,我已将登录插件设置为“由用户组重定向定义”。 听起来很简单和直观, ...
提示:本站收集StackOverFlow近2千万问答,支持中英文搜索,鼠标放在语句上弹窗显示对应的参考中文或英文, 本站还提供 中文繁体 英文版本 中英对照 版本,有任何建议请联系yoyou2525@163.com。
我正在使用 extension_builder 构建自己的扩展。
将数据放入数据库后,我需要它到 go 到 Show Action。
这是我的创建动作
/**
* action create
*
* @param \Originalen\OrigWhistleblower\Domain\Model\Whistleblower $newWhistleblower
* @return void
*/
public function createAction(\Originalen\OrigWhistleblower\Domain\Model\Whistleblower $newWhistleblower)
{
$this->whistleblowerRepository->add($newWhistleblower);
$this->redirect('show', 'Whistleblower', 'orig_whistleblower', ['whistleblower' => $this]);
//$this->redirect('show');
}
但是我收到一条错误消息,说Required argument "whistleblower" is not set for Originalen\OrigWhistleblower\Controller\WhistleblowerController->show.
您需要将 object 传递给 arguments。 您的$this
变量是实际的 class 而不是新的 object。 您应该将其替换为$newWhistleblower
。
$this->redirect('show', 'Whistleblower', 'orig_whistleblower', ['whistleblower' => $newWhistleblower]);
同时,我会在直接之前将其持久化,以确保(将其保存在数据库中。add add->()
命令尚未保存 object)。
$this->persistenceManager->persistAll();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.