Dashboard bundle for Symfony

The bundle is based on Creative Tim's Material Dashboard and is intended to make the integration into Symfony projects easier


Project maintained by WebBamboo Hosted on GitHub Pages — Theme by mattgraham

Configuration

In ‘config/packages/twig.yaml’ add the following:

twig:
    ...
    form_themes: ['bootstrap_4_layout.html.twig']

In ‘config/packages/’ create a file called: material_dashboard.yaml

Example configuration:

material_dashboard:
  menu_header:
      title: Material Dashboard
      anchor: /
  sidebar_background: /bundles/materialdashboard/img/sidebar-1.jpg
  color: green 
  menu:
      example_dashboard:
          label: Home
          icon: dashboard
          parameters:
              - { name: language, value: en }
  user_menu:
      example_profile:
          label: Profile
          parameters:
              - { name: language, value: en }

Step by step explanation

1.menu_header segment menuheader.png

This applies to the Header of the left menu. In my example the text of the header is “Material Dashboard” and the anchor points to “/”

2.sidebar_background segment

This tells the sidebar which image to use. Available options included in the dashboard are

3.color segment This is the theme color option. Possible options are:

4.menu and user_menu segment The menu and user_menu segments are a yaml array containing all menu entries. Lets look in the example menu entry:

example_dashboard:
    label: Home
    icon: dashboard
    parameters:
        - { name: language, value: en }		

example_dashboard is the route name label is the label in the menu icon is a material icon name. You can see all material icons here parameters is a key => value array of the route parameters, same as you would supply to Twig’s path() and url() functions

The menu segment applies to the left menu and the user_menu applies to the drop-down menu in the upper right corner

Table of contents: