local/modules/Statistic/Hook/AdminStatisticHook.php line 27

Open in your IDE?
  1. <?php
  2. /*************************************************************************************/
  3. /*      This file is part of the Thelia package.                                     */
  4. /*                                                                                   */
  5. /*      Copyright (c) OpenStudio                                                     */
  6. /*      email : dev@thelia.net                                                       */
  7. /*      web : http://www.thelia.net                                                  */
  8. /*                                                                                   */
  9. /*      For the full copyright and license information, please view the LICENSE.txt  */
  10. /*      file that was distributed with this source code.                             */
  11. /*************************************************************************************/
  12. namespace Statistic\Hook;
  13. use Statistic\Statistic;
  14. use Thelia\Core\Event\Hook\HookRenderBlockEvent;
  15. use Thelia\Core\Event\Hook\HookRenderEvent;
  16. use Thelia\Core\Hook\BaseHook;
  17. /**
  18.  * Class AdminStatisticHook
  19.  * @package Statistic\Hook
  20.  * @author David Gros <dgros@openstudio.fr>
  21.  */
  22. class AdminStatisticHook extends BaseHook
  23. {
  24.     public function onStatisticTab(HookRenderBlockEvent $event)
  25.     {
  26.         $event
  27.             ->add(array(
  28.                 'tab_id' => 'general-statistic',
  29.                 'tab_nav_title' => $this->trans('tool.panel.general.title', [], Statistic::MESSAGE_DOMAIN),
  30.                 'content' => $this->render('hook/statistic-general.html')
  31.             ))
  32.             ->add(array(
  33.                 'tab_id' => 'product-statistic',
  34.                 'tab_nav_title' => $this->trans('tool.panel.product.title', [], Statistic::MESSAGE_DOMAIN),
  35.                 'content' => $this->render('hook/statistic-product.html')
  36.             ))
  37.             ->add(array(
  38.                 'tab_id' => 'brand-statistic',
  39.                 'tab_nav_title' => $this->trans('tool.panel.brand.title', [], Statistic::MESSAGE_DOMAIN),
  40.                 'content' => $this->render('hook/statistic-brand.html')
  41.             ))
  42.             ->add(array(
  43.                 'tab_id' => 'anual-statistic',
  44.                 'tab_nav_title' => $this->trans('tool.panel.annual.title', [], Statistic::MESSAGE_DOMAIN),
  45.                 'content' => $this->render('hook/statistic-annual.html')
  46.             ))
  47.         ;
  48.     }
  49.     public function insertionJS(HookRenderEvent $event)
  50.     {
  51.         $css $this->addCSS('assets/css/bootstrap-datepicker3.css');
  52.         $event->add($css);
  53.         $statsCss $this->addCSS('assets/css/stats.css');
  54.         $event->add($statsCss);
  55.         $JQplotcss $this->addCSS('assets/css/jquery.jqplot.css');
  56.         $event->add($JQplotcss);
  57.         $dataTable $this->addJS('assets/js/jquery.dataTables.min.js');
  58.         $event->add($dataTable);
  59.         $bootstrapDataTable $this->addJS('assets/js/datatables.bootstrap.min.js');
  60.         $event->add($bootstrapDataTable);
  61.         $searchJs $this->addJS('assets/js/modalSearch.js');
  62.         $event->add($searchJs);
  63.         $blocksitJs $this->addJS('assets/js/blocksit.min.js');
  64.         $event->add($blocksitJs);
  65.         $datePickerJS $this->addJS('assets/js/bootstrap-datepicker.js');
  66.         $event->add($datePickerJS);
  67.         $statisticJs $this->addJS('assets/js/statistic.js');
  68.         $event->add($statisticJs);
  69.         $productJs $this->addJS('assets/js/statistic-product.js');
  70.         $event->add($productJs);
  71.         $brandJs $this->addJS('assets/js/statistic-brand.js');
  72.         $event->add($brandJs);
  73.         $annualJs $this->addJS('assets/js/statistic-annual.js');
  74.         $event->add($annualJs);
  75.     }
  76. }