|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* YAWIK |
|
5
|
|
|
* |
|
6
|
|
|
* @filesource |
|
7
|
|
|
* @copyright (c) 2013 - 2016 Cross Solution (http://cross-solution.de) |
|
8
|
|
|
* @license MIT |
|
9
|
|
|
*/ |
|
10
|
|
|
|
|
11
|
|
|
namespace Applications\Entity; |
|
12
|
|
|
|
|
13
|
|
|
use Settings\Entity\DisableElementsCapableFormSettings; |
|
14
|
|
|
use Settings\Entity\ModuleSettingsContainer; |
|
15
|
|
|
use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM; |
|
16
|
|
|
|
|
17
|
|
|
/** |
|
18
|
|
|
* General Settings for the application module. |
|
19
|
|
|
* |
|
20
|
|
|
* @ODM\EmbeddedDocument |
|
21
|
|
|
*/ |
|
22
|
|
|
class Settings extends ModuleSettingsContainer implements SettingsInterface |
|
23
|
|
|
{ |
|
24
|
|
|
|
|
25
|
|
|
/** |
|
26
|
|
|
* send mail to the recruiter |
|
27
|
|
|
* |
|
28
|
|
|
* @ODM\Boolean |
|
29
|
|
|
*/ |
|
30
|
|
|
protected $mailAccess = false; |
|
31
|
|
|
|
|
32
|
|
|
/** |
|
33
|
|
|
* send BlindCarbonCopy to organization admin |
|
34
|
|
|
* |
|
35
|
|
|
* @ODM\Boolean |
|
36
|
|
|
*/ |
|
37
|
|
|
protected $mailBCC = false; |
|
38
|
|
|
|
|
39
|
|
|
|
|
40
|
|
|
/** |
|
41
|
|
|
* @todo document this |
|
42
|
|
|
* |
|
43
|
|
|
* @ODM\Boolean |
|
44
|
|
|
*/ |
|
45
|
|
|
protected $formDisplaySkills = false; |
|
46
|
|
|
|
|
47
|
|
|
|
|
48
|
|
|
/** |
|
49
|
|
|
* Confirm application immediately after submitting. |
|
50
|
|
|
* |
|
51
|
|
|
* @ODM\Boolean |
|
52
|
|
|
*/ |
|
53
|
|
|
protected $autoConfirmMail = false; |
|
54
|
|
|
|
|
55
|
|
|
/** |
|
56
|
|
|
* Mail text, which informs the recruiter about an incoming application |
|
57
|
|
|
* |
|
58
|
|
|
* @ODM\Field(type="string") |
|
59
|
|
|
*/ |
|
60
|
|
|
protected $mailAccessText; |
|
61
|
|
|
|
|
62
|
|
|
/** |
|
63
|
|
|
* Mail text for inviting an applicant. Mail is sent to the applicant |
|
64
|
|
|
* |
|
65
|
|
|
* @ODM\Field(type="string") |
|
66
|
|
|
*/ |
|
67
|
|
|
protected $mailInvitationText; |
|
68
|
|
|
|
|
69
|
|
|
/** |
|
70
|
|
|
* Mail text for accepting an applicant. Mail is sent to the recruiter |
|
71
|
|
|
* |
|
72
|
|
|
* @ODM\Field(type="string") |
|
73
|
|
|
*/ |
|
74
|
|
|
protected $mailAcceptedText; |
|
75
|
|
|
|
|
76
|
|
|
|
|
77
|
|
|
/** |
|
78
|
|
|
* Mail text for confirming an application- |
|
79
|
|
|
* |
|
80
|
|
|
* @ODM\Field(type="string") |
|
81
|
|
|
*/ |
|
82
|
|
|
protected $mailConfirmationText; |
|
83
|
|
|
|
|
84
|
|
|
/** |
|
85
|
|
|
* Mail text for rejecting an application |
|
86
|
|
|
* |
|
87
|
|
|
* @ODM\Field(type="string") |
|
88
|
|
|
*/ |
|
89
|
|
|
protected $mailRejectionText; |
|
90
|
|
|
|
|
91
|
|
|
/** |
|
92
|
|
|
* Disabled elements of the apply form. |
|
93
|
|
|
* |
|
94
|
|
|
* @ODM\EmbedOne(targetDocument="\Settings\Entity\DisableElementsCapableFormSettings") |
|
95
|
|
|
* @var \Settings\Entity\DisableElementsCapableFormSettings |
|
96
|
|
|
*/ |
|
97
|
|
|
protected $applyFormSettings; |
|
98
|
|
|
|
|
99
|
|
|
/** |
|
100
|
|
|
* @param $mailAccess |
|
101
|
|
|
* @return $this |
|
102
|
|
|
*/ |
|
103
|
|
|
public function setMailAccess($mailAccess) |
|
104
|
|
|
{ |
|
105
|
|
|
$this->mailAccess = (bool) $mailAccess; |
|
106
|
|
|
return $this; |
|
107
|
|
|
} |
|
108
|
|
|
|
|
109
|
|
|
/** |
|
110
|
|
|
* @return bool |
|
111
|
|
|
*/ |
|
112
|
|
|
public function getMailAccess() |
|
113
|
|
|
{ |
|
114
|
|
|
return $this->mailAccess; |
|
115
|
|
|
} |
|
116
|
|
|
|
|
117
|
|
|
/** |
|
118
|
|
|
* @param $formDisplaySkills |
|
119
|
|
|
* @return $this |
|
120
|
|
|
*/ |
|
121
|
|
|
public function setFormDisplaySkills($formDisplaySkills) |
|
122
|
|
|
{ |
|
123
|
|
|
$this->formDisplaySkills = (bool) $formDisplaySkills; |
|
124
|
|
|
return $this; |
|
125
|
|
|
} |
|
126
|
|
|
|
|
127
|
|
|
/** |
|
128
|
|
|
* Gets the disabled apply form elements settings. |
|
129
|
|
|
* |
|
130
|
|
|
* @return DisableElementsCapableFormSettings |
|
131
|
|
|
*/ |
|
132
|
|
|
public function getApplyFormSettings() |
|
133
|
|
|
{ |
|
134
|
|
|
if (!$this->applyFormSettings) { |
|
135
|
|
|
$settings = new DisableElementsCapableFormSettings(); |
|
136
|
|
|
$settings->setForm('Applications/Apply'); |
|
|
|
|
|
|
137
|
|
|
$this->applyFormSettings = $settings; |
|
138
|
|
|
} |
|
139
|
|
|
return $this->applyFormSettings; |
|
140
|
|
|
} |
|
141
|
|
|
|
|
142
|
|
|
/** |
|
143
|
|
|
* @return bool |
|
144
|
|
|
*/ |
|
145
|
|
|
public function getAutoConfirmMail(){ |
|
146
|
|
|
return $this->autoConfirmMail; |
|
147
|
|
|
} |
|
148
|
|
|
} |
|
149
|
|
|
|
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.
In this case you can add the
@ignorePhpDoc annotation to the duplicate definition and it will be ignored.