Completed
Pull Request — master (#13)
by zzuutt
02:32
created

Configuration   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
c 1
b 0
f 1
lcom 0
cbo 0
dl 0
loc 30
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A buildForm() 0 17 1
A getName() 0 4 1
1
<?php
2
/*************************************************************************************/
3
/*      This file is part of the Thelia package.                                     */
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 Dealer\Form;
14
15
use Dealer\Dealer;
16
use Thelia\Core\Translation\Translator;
17
use Thelia\Form\BaseForm;
18
use Thelia\Model\ConfigQuery;
19
20
/**
21
 * Class Configuration
22
 * @package DealerGoogleTimeZone\Form
23
 */
24
class Configuration extends BaseForm {
25
26
    protected function buildForm()
27
    {
28
        $form = $this->formBuilder;
29
30
        $form->add(
31
            "googlemapsapi_key",
32
            "text",
33
            array(
34
                'data'  => Dealer::getConfigValue("googlemapsapi_key"),
35
                'label' => Translator::getInstance()->trans("Google Maps Api Key"),
36
                'label_attr' => array(
37
                    'for' => "googlemapsapi_key"
38
                ),
39
            )
40
        );
41
42
    }
43
44
    /**
45
     * @return string the name of you form. This name must be unique
46
     */
47
    public function getName()
48
    {
49
        return "dealer_configuration";
50
    }
51
52
53
}