local/modules/Statistic/Hook/AdminToolHook.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\Hook\BaseHook;
  16. use Thelia\Tools\URL;
  17. /**
  18.  * Class AdminToolHook
  19.  * @package Statistic\Hook
  20.  * @author David Gros <dgros@openstudio.fr>
  21.  */
  22. class AdminToolHook extends BaseHook
  23. {
  24.     public function onMainTopMenuTools(HookRenderBlockEvent $event)
  25.     {
  26.         $event->add(array(
  27.             "url" => URL::getInstance()->absoluteUrl("/admin/module/statistic/tool"),
  28.             "title" => $this->trans("tool.title", [], Statistic::MESSAGE_DOMAIN)
  29.         ));
  30.     }
  31. }