Completed
Pull Request — develop (#323)
by Mathias
15:36
created

Classifications::setProfessions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
/**
3
 * YAWIK
4
 *
5
 * @filesource
6
 * @license MIT
7
 * @copyright  2013 - 2016 Cross Solution <http://cross-solution.de>
8
 */
9
  
10
/** */
11
namespace Jobs\Entity;
12
13
use Core\Entity\EntityInterface;
14
use Core\Entity\EntityTrait;
15
use Core\Entity\Tree\EmbeddedLeafs;
16
use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
17
18
/**
19
 * Stores the classifications (categories) of a job.
20
 *
21
 * @ODM\EmbeddedDocument
22
 * @author Mathias Gelhausen <[email protected]>
23
 * @since 0,29
24
 */
25
class Classifications implements EntityInterface
26
{
27
28
    use EntityTrait;
29
30
    /**
31
     * The professions.
32
     *
33
     * @ODM\EmbedOne(targetDocument="\Core\Entity\Tree\EmbeddedLeafs")
34
     * @var EmbeddedLeafs
35
     */
36
    private $professions;
37
38
    /**
39
     * The employment types.
40
     *
41
     * @ODM\EmbedOne(targetDocument="\Core\Entity\Tree\EmbeddedLeafs")
42
     * @var EmbeddedLeafs
43
     */
44
    private $employmentTypes;
45
46
    /**
47
     * Set the employment types.
48
     *
49
     * @param \Core\Entity\Tree\EmbeddedLeafs $employmentTypes
50
     *
51
     * @return self
52
     */
53
    public function setEmploymentTypes($employmentTypes)
54
    {
55
        $this->employmentTypes = $employmentTypes;
56
57
        return $this;
58
    }
59
60
    /**
61
     * Get the employment types.
62
     *
63
     * @return \Core\Entity\Tree\EmbeddedLeafs
64
     */
65
    public function getEmploymentTypes()
66
    {
67
        if (!$this->employmentTypes) {
68
            $this->setEmploymentTypes(new EmbeddedLeafs());
69
        }
70
71
        return $this->employmentTypes;
72
    }
73
74
    /**
75
     * Set the professions.
76
     *
77
     * @param \Core\Entity\Tree\EmbeddedLeafs $professions
78
     *
79
     * @return self
80
     */
81
    public function setProfessions($professions)
82
    {
83
        $this->professions = $professions;
84
85
        return $this;
86
    }
87
88
    /**
89
     * Get the professions.
90
     *
91
     * @return \Core\Entity\Tree\EmbeddedLeafs
92
     */
93
    public function getProfessions()
94
    {
95
        if (!$this->professions) {
96
            $this->setProfessions(new EmbeddedLeafs());
97
        }
98
99
        return $this->professions;
100
    }
101
102
103
}