动态路线Sonata管理员

时间:2018-09-07 14:09:01

标签: php sonata-admin symfony4

我不知道如何配置列表字段以启用动态路由。这是我的代码, URL 仅链接到静态页面,这不是我想要的。任何帮助表示赞赏。预先感谢。

protected function configureListFields(ListMapper $listMapper)
{

    $listMapper
        ->add('name')
        ->add('intro')
        //->add('content')
        //->add('url', 'url', ['route' => ['url' => 'admin_app_solution_edit', 'parameters' => ['id' => 'solution.id']]])
        ->add('url', 'url', ['route' => ['url' => 'https://www.curious-inc.com/stories/wij-zijn-tevreden-als-u-dat-bent', 'parameters' => ['id' => 'solution.id']]])
        //->add('url', 'url',  ['url' => 'https://www.curious-inc.com/stories/wij-zijn-tevreden-als-u-dat-bent', 'parameters' => ['id' => 'solution.id']])
        //->add('url')
        ->add('thumbnail')
        ->add('_action', null, [
            'actions' => [
                'show' => [],
                'edit' => [],
                'delete' => [],
            ]
        ]);


}

0 个答案:

没有答案