PHPackages                             ics/dashboard-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Admin Panels](/categories/admin)
4. /
5. ics/dashboard-bundle

ActiveSymfony-bundle[Admin Panels](/categories/admin)

ics/dashboard-bundle
====================

Bundle de gestion des tableaux de bord

0.0.8(4y ago)22072MITJavaScript

Since Apr 1Pushed 4y ago2 watchersCompare

[ Source](https://github.com/imperiumclansoftware/dashboard-bundle)[ Packagist](https://packagist.org/packages/ics/dashboard-bundle)[ RSS](/packages/ics-dashboard-bundle/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (7)Dependencies (10)Versions (8)Used By (2)

Imperium Clan Software - Dashboard Bundle
=========================================

[](#imperium-clan-software---dashboard-bundle)

Dashboard for symfony bundle

Installation
------------

[](#installation)

Make sure Composer is installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md)of the Composer documentation.

### Applications that use Symfony Flex

[](#applications-that-use-symfony-flex)

Open a command console, enter your project directory and execute:

```
composer require ics/dashboard-bundle
```

### Applications that don't use Symfony Flex

[](#applications-that-dont-use-symfony-flex)

#### Step 1: Download the Bundle

[](#step-1-download-the-bundle)

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

```
composer require ics/dashboard-bundle
```

#### Step 2: Enable the Bundle

[](#step-2-enable-the-bundle)

Then, enable the bundle by adding it to the list of registered bundles in the `config/bundles.php` file of your project:

```
// config/bundles.php

return [
    // ...
    ICS\DashboardBundle\DashboardBundle::class => ['all' => true],
];
```

#### Step 3: Adding bundle routing

[](#step-3-adding-bundle-routing)

Add routes in applications `config/routes.yaml`

```
# config/routes.yaml

# ...
dashboard_bundle:
    resource: '@DashboardBundle/config/routes.yaml'
    prefix: /dashboard
# ...
```

#### Step 4: Install Database

[](#step-4-install-database)

For install database :

```
# Installer la base de données

php bin/console doctrine:schema:create
```

For update database :

```
# Mise a jour la base de données

php bin/console doctrine:schema:update -f
```

Configuration
-------------

[](#configuration)

### Step 1 : Dashboard configuration

[](#step-1--dashboard-configuration)

```
    # config/packages/dashboard.yaml

    dashboard:
        dashboards:
            homepage:
                nbColumns: 12
                widgets:
                    datetime:
                        entity: ICS\DashboardBundle\Entity\DTWidget
                        libelle: Date and Time
                        icon: fa fa-clock
                        group: Generic
                        roles: ['ROLE_USER']
                    help:
                        entity: ICS\DashboardBundle\Entity\HelpWidget
                        libelle: Help
                        icon: fa fa-question-circle
                        group: Generic
                        roles: ['ROLE_USER']
                    postit:
                        entity: ICS\DashboardBundle\Entity\PostitWidget
                        libelle: Post-It
                        icon: fa fa-sticky-note
                        group: Generic
                        roles: ['ROLE_USER']
```

### Step 2 : Twig integration

[](#step-2--twig-integration)

```
    {# templates/index.html.twig #}

    {% extends 'base.html.twig' %}

    {% block title %}Homepage{% endblock %}

    {% block stylesheets %}
        {{ renderDashBoardcss('homepage') }}
    {% endblock %}

    {% block body %}
        {{ renderDashBoard('homepage') }}
    {% endblock %}

    {% block javascripts %}
        {{ renderDashBoardjs('homepage') }}
    {% endblock %}
```

Widget Developpement
--------------------

[](#widget-developpement)

### Step 1 : Create entity

[](#step-1--create-entity)

To start, write an entity inheriting from `Widget`.

This must have at least the `getUI()` method. It can also have the `getJs()` and `getCss()` methods to add javascripts or css to your widgets.

```
