PageForm::initialize()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 26

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 26
rs 9.504
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: office-pb1
5
 * Date: 07.07.14
6
 * Time: 22:48
7
 */
8
9
namespace Page\Form;
10
11
use Application\Form\Form;
12
use Phalcon\Forms\Element\Text;
13
use Phalcon\Forms\Element\TextArea;
14
15
class PageForm extends Form
16
{
17
18
    public function initialize()
19
    {
20
        $title = new Text('title', array('required' => true));
21
        $title->setLabel('Title');
22
        $this->add($title);
23
24
        $slug = new Text('slug');
25
        $slug->setLabel('Slug');
26
        $this->add($slug);
27
28
        $text = new TextArea('text');
29
        $text->setLabel('Text');
30
        $this->add($text);
31
32
        $meta_title = new Text('meta_title', array('required' => true));
33
        $meta_title->setLabel('meta-title');
34
        $this->add($meta_title);
35
36
        $meta_description = new TextArea('meta_description');
37
        $meta_description->setLabel('meta-description');
38
        $this->add($meta_description);
39
40
        $meta_keywords = new TextArea('meta_keywords');
41
        $meta_keywords->setLabel('meta-keywords');
42
        $this->add($meta_keywords);
43
    }
44
45
}