Completed
Push — develop ( 69bf64...c61561 )
by
unknown
09:01
created

CvContainer::init()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 28
Code Lines 19

Duplication

Lines 0
Ratio 0 %

Importance

Changes 4
Bugs 0 Features 1
Metric Value
c 4
b 0
f 1
dl 0
loc 28
rs 8.8571
cc 1
eloc 19
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 Cv\Form;
11
12
use Core\Form\Container;
13
use Core\Form\ViewPartialProviderInterface;
14
use Core\Form\ViewPartialProviderTrait;
15
16
/**
17
 * CV form container
18
 */
19
class CvContainer extends Container implements ViewPartialProviderInterface
20
{
21
    use ViewPartialProviderTrait;
22
23
    /**
24
     * @var string
25
     */
26
    protected $defaultPartial = 'cv/form/cv-container';
27
    
28
    public function init()
29
    {
30
        $this->setName('cv-form');
31
        
32
        $this->setForms(array(
33
            'contact' => array(
34
                'type' => 'Auth/UserInfo',
35
                'property' => 'contact'
36
            ),
37
            'image' => array(
38
                'type' => 'CvContactImage',
39
                'property' => 'contact',
40
                'use_files_array' => true
41
            ),
42
            'employments' => array(
43
                'type' => 'CvEmploymentCollection',
44
                'property' => 'employmentsIndexedById'
45
            ),
46
            'educations' => array(
47
                'type' => 'CvEducationCollection',
48
                'property' => 'educationsIndexedById'
49
            ),
50
            'skills' => array(
51
                'type' => 'CvSkillCollection',
52
                'property' => 'skillsIndexedById'
53
            )
54
        ));
55
    }
56
}
57