Skip to content
This repository was archived by the owner on May 9, 2019. It is now read-only.

Creating icons

xaav edited this page Oct 2, 2011 · 1 revision

Adding an icon to the dashboard is quite simple. Only two things are required: the icon asset URL, and the route for where it will go.

Create the following file (you can infer it's name from the namespace):

<?php

namespace YourVendor\YourBundle\Dashboard;

use HelioNetworks\HelioPanel\Dashboard\IconInterface;

class FileManagerIcon implements IconInterface
{
    public function getRoute()
    {
        return 'directory_list';
    }

    public function getImage()
    {
        return 'path/to/img.gif';
    }
}

Now that we've created the icon, let's register it. Define the following service:

 heliopanel.dashboard.icon.file_manager:
      class: YourVendor\YourBundle\Dashboard\FileManagerIcon
      tags:
        - { name: heliopanel.dashboard.icon }
Clone this wiki locally