<?php

/*
 * PuzzleApp
 * Webemyos
 * Jérôme Oliva
 * GNU Licence
 */

namespace Apps\DownloadManager\Widget\AdminDashBoard;

use Core\View\View;
use Core\View\ElementView;
use Apps\DownloadManager\Helper\DocumentHelper;

class AdminDashBoard {

    function __construct($core) {
        $this->Core = $core;
    }

    function Render($params = "") {
        $view  = new View(__DIR__ . "/View/adminDashboard.tpl", $this->Core);
        $stats = DocumentHelper::GetDownloadStats($this->Core);
        $view->AddElement(new ElementView("Stats", $stats));
        return $view->Render();
    }
}

?>
