Dashboard

Like the menu you can add your own items to the dashboard. You can check the DashboardExample class.

App\Dashboard\DashboardExample:
    tags:
      - { name: 'kernel.event_listener', event: 'glynn_admin.dashboard_items', method: 'get' }
public function get($event)
{
    $items = $event->getItems();
    $twig = $event->getTwig();
    $items->add($twig->render('admin/dashboard/example.html.twig'));
}

In the event are items, and a twig environment. If you add a template to the items you will get, you know, a block on the dashboard page in the admin!

results matching ""

    No results matching ""