local/modules/TakeCustomerAccount/Hook/AdminCustomerHook.php line 28

Open in your IDE?
  1. <?php
  2. /*************************************************************************************/
  3. /*      This file is part of the module TakeCustomerAccount                          */
  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 TakeCustomerAccount\Hook;
  13. use Thelia\Core\Event\Hook\HookRenderEvent;
  14. use Thelia\Core\Hook\BaseHook;
  15. /**
  16.  * Class AdminCustomerHook
  17.  * @package TakeCustomerAccount\Hook
  18.  * @author Gilles Bourgeat <gbourgeat@openstudio.fr>
  19.  */
  20. class AdminCustomerHook extends BaseHook
  21. {
  22.     /**
  23.      * @param HookRenderEvent $event
  24.      */
  25.     public function onCustomerEdit(HookRenderEvent $event)
  26.     {
  27.         $event->add($this->render(
  28.             'take-customer-account/hook/customer-edit.html',
  29.             array(
  30.                 'customer_id' => $event->getArgument('customer_id')
  31.             )
  32.         ));
  33.     }
  34.     /**
  35.      * @param HookRenderEvent $event
  36.      */
  37.     public function onCustomerEditJs(HookRenderEvent $event)
  38.     {
  39.         $event->add($this->render(
  40.             'take-customer-account/hook/customer-edit-js.html',
  41.             array(
  42.                 'customer_id' => $event->getArgument('customer_id')
  43.             )
  44.         ));
  45.     }
  46. }