【发布时间】:2019-03-05 11:31:02
【问题描述】:
public function pages($slug, PagesGenerator $pagesGenerator)
{
$output = $pagesGenerator->getPages($slug);
$id = $page->getId();
return $this->render('list.html.twig', [ 'output' => $output, 'id' => $id]);
}
但我得到了错误:
注意:未定义变量:页面
【问题讨论】:
-
不应该是
$output['page']->getId()吗?