1. Go to this page and download the library: Download ics/dashboard-bundle library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
namespace ICS\DashboardBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use ICS\DashboardBundle\Form\Type\DTWidgetType;
use Twig\Environment;
/**
* @ORM\Table(name="dtwidgets", schema="dashboard")
* @ORM\Entity
*/
class DTWidget extends Widget
{
/**
* @ORM\Column(type="string", nullable=false)
*/
private $timezone = 'Europe/Paris';
protected $configForm = DTWidgetType::class;
protected $resize = false;
public function __construct(Environment $twig)
{
parent::__construct($twig);
$this->setWidth(2);
$this->setHeight(2);
}
public function getJs()
{
if (null == $this->twig) {
return '';
}
return $this->twig->render('@Dashboard/Generic/DTWidget.js.twig', ['widget' => $this]);
}
public function getUI()
{
if (null == $this->twig) {
return '';
}
return $this->twig->render('@Dashboard/Generic/DTWidget.html.twig', ['widget' => $this]);
}
/**
* Get the value of timezone.
*/
public function getTimezone()
{
return $this->timezone;
}
/**
* Set the value of timezone.
*
* @return self
*/
public function setTimezone($timezone)
{
$this->timezone = $timezone;
return $this;
}
bash
# Installer la base de données
php bin/console doctrine:schema:create
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.