AdminCustomerHook   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 0
cbo 0
dl 0
loc 28
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A onCustomerEdit() 0 9 1
A onCustomerEditJs() 0 9 1
1
<?php
2
/*************************************************************************************/
3
/*      This file is part of the module TakeCustomerAccount                          */
4
/*                                                                                   */
5
/*      Copyright (c) OpenStudio                                                     */
6
/*      email : [email protected]                                                       */
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
13
namespace TakeCustomerAccount\Hook;
14
15
use Thelia\Core\Event\Hook\HookRenderEvent;
16
use Thelia\Core\Hook\BaseHook;
17
18
/**
19
 * Class AdminCustomerHook
20
 * @package TakeCustomerAccount\Hook
21
 * @author Gilles Bourgeat <[email protected]>
22
 */
23
class AdminCustomerHook extends BaseHook
24
{
25
    /**
26
     * @param HookRenderEvent $event
27
     */
28
    public function onCustomerEdit(HookRenderEvent $event)
29
    {
30
        $event->add($this->render(
31
            'take-customer-account/hook/customer-edit.html',
32
            array(
33
                'customer_id' => $event->getArgument('customer_id')
34
            )
35
        ));
36
    }
37
38
    /**
39
     * @param HookRenderEvent $event
40
     */
41
    public function onCustomerEditJs(HookRenderEvent $event)
42
    {
43
        $event->add($this->render(
44
            'take-customer-account/hook/customer-edit-js.html',
45
            array(
46
                'customer_id' => $event->getArgument('customer_id')
47
            )
48
        ));
49
    }
50
}
51