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

LocalizationSettingsFieldset::init()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 48
Code Lines 35

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 48
rs 9.125
cc 1
eloc 35
nc 1
nop 0
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