1 <?php
2
3 namespace Balance\Form;
4
5 use Balance\Model\AccountType;
6 use Zend\Form\Form;
7
8 9 10
11 class Accounts extends Form
12 {
13 14 15
16 public function init()
17 {
18
19 $this->add(array(
20 'type' => 'Hidden',
21 'name' => 'id',
22 ));
23
24
25 $this->add(array(
26 'type' => 'Select',
27 'name' => 'type',
28 'options' => array(
29 'value_options' => (new AccountType())->getDefinition(),
30 ),
31 ));
32
33
34 $this->add(array(
35 'type' => 'Boolean',
36 'name' => 'accumulate',
37 ));
38
39
40 $this->add(array(
41 'type' => 'Text',
42 'name' => 'name',
43 ));
44
45
46 $this->add(array(
47 'type' => 'Textarea',
48 'name' => 'description',
49 ));
50 }
51 }
52