在sonata admin上添加路由



在这种情况下我是新手。我创建了一个路由和控制器。这是我的代码:

<?php
// /src/Acme/DemoBundle/Controller/MediaCRUDController.php
namespace AppBundleController;
use SonataAdminBundleControllerCRUDController;
class RatingController extends CRUDController
{
public function indexAction()
{
eturn $this->render('CCApplicationBundle:Default:rating.html.twig');
}
}

和我的路线:

admin_dashboard_rating:
path:  /rating
defaults: { _controller: AppBundle:Rating:index }

有没有一种方法可以嵌入到奏鸣曲管理员的链接?

请帮忙。

谢谢


sonata_admin.yaml配置文件中:

dashboard:
groups:
...
rating:
on_top:         true
label:          label.rating
icon:           '<i class="fa fa-star"></i>'
items:
- route:    admin_dashboard_rating
label:    rating

最新更新