Completed
Push — develop ( e649e8...88dc2a )
by
unknown
15:53 queued 08:30
created

LocalizationSettingsFieldset   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 54
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A init() 0 48 1
1
<?php
2
/**
3
 * YAWIK
4
 *
5
 * @filesource
6
 * @copyright (c) 2013 - 2016 Cross Solution (http://cross-solution.de)
7
 * @license   MIT
8
 */
9
10
namespace Core\Form;
11
12
use Zend\Form\Fieldset;
13
14
/**
15
 * Class LocalizationSettingsFieldset
16
 *
17
 * @package Core\Form
18
 */
19
class LocalizationSettingsFieldset extends Fieldset
20
{
21
    /**
22
     * Initialize the Sele
23
     */
24
    public function init()
25
    {
26
        $this->setLabel('general settings');
27
        
28
        $this->add(
29
            array(
30
                'type' => 'Zend\Form\Element\Select',
31
                'name' => 'language',
32
                'options' => array(
33
                        'label' => /* @translate */ 'choose your language',
34
                        'value_options' => array(
35
                                'en' => /* @translate */ 'English',
36
                                'fr' => /* @translate */ 'French',
37
                                'de' => /* @translate */ 'German',
38
                                'it' => /* @translate */ 'Italian',
39
                                'po' => /* @translate */ 'Polish',
40
                                'ru' => /* @translate */ 'Russian',
41
                                'tr' => /* @translate */ 'Turkish',
42
                                'es' => /* @translate */ 'Spanish',
43
                        ),
44
                        'description' => /* @translate */ 'defines the languages of this frontend.'
45
                ),
46
            )
47
        );
48
49
        $timezones=array_merge(
50
            \DateTimeZone::listIdentifiers(\DateTimeZone::AFRICA),
51
            \DateTimeZone::listIdentifiers(\DateTimeZone::AMERICA),
52
            \DateTimeZone::listIdentifiers(\DateTimeZone::ASIA),
53
            \DateTimeZone::listIdentifiers(\DateTimeZone::ATLANTIC),
54
            \DateTimeZone::listIdentifiers(\DateTimeZone::AUSTRALIA),
55
            \DateTimeZone::listIdentifiers(\DateTimeZone::EUROPE),
56
            \DateTimeZone::listIdentifiers(\DateTimeZone::INDIAN),
57
            \DateTimeZone::listIdentifiers(\DateTimeZone::PACIFIC)            
58
        );
59
        
60
        $this->add(
61
            array(
62
                'type' => 'Zend\Form\Element\Select',
63
                'name' => 'timezone',
64
                'options' => array(
65
                        'label' => /* @translate */ 'choose your timzone',
66
                        'value_options' => $timezones,
67
                        'description' => /* @translate */ 'defines your local timezone.'
68
                ),
69
            )
70
        );
71
    }
72
}
73