Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
sg_jobs
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TYPO3
sg_jobs
Commits
669d5261
Commit
669d5261
authored
1 year ago
by
Kevin von Spiczak
Browse files
Options
Downloads
Patches
Plain Diff
[TASK] allow multiple experience levels per job
parent
ec49c1e3
No related branches found
No related tags found
1 merge request
!46
AZM changes
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Classes/Domain/Model/Job.php
+52
-22
52 additions, 22 deletions
Classes/Domain/Model/Job.php
ext_tables.sql
+2
-3
2 additions, 3 deletions
ext_tables.sql
with
54 additions
and
25 deletions
Classes/Domain/Model/Job.php
+
52
−
22
View file @
669d5261
...
@@ -65,11 +65,6 @@ class Job extends AbstractEntity {
...
@@ -65,11 +65,6 @@ class Job extends AbstractEntity {
*/
*/
protected
$department
;
protected
$department
;
/**
* @var ExperienceLevel
*/
protected
$experienceLevel
;
/**
/**
* @var bool
* @var bool
*/
*/
...
@@ -118,6 +113,12 @@ class Job extends AbstractEntity {
...
@@ -118,6 +113,12 @@ class Job extends AbstractEntity {
*/
*/
protected
$relatedJobs
;
protected
$relatedJobs
;
/**
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
* @var ObjectStorage<ExperienceLevel>
*/
protected
$experienceLevel
;
/**
/**
* @var string $description
* @var string $description
*/
*/
...
@@ -353,20 +354,6 @@ class Job extends AbstractEntity {
...
@@ -353,20 +354,6 @@ class Job extends AbstractEntity {
$this
->
department
=
$department
;
$this
->
department
=
$department
;
}
}
/**
* @return ExperienceLevel|NULL
*/
public
function
getExperienceLevel
()
{
return
$this
->
experienceLevel
;
}
/**
* @param ExperienceLevel $experienceLevel
*/
public
function
setExperienceLevel
(
ExperienceLevel
$experienceLevel
)
{
$this
->
experienceLevel
=
$experienceLevel
;
}
/**
/**
* @return string
* @return string
*/
*/
...
@@ -580,17 +567,60 @@ class Job extends AbstractEntity {
...
@@ -580,17 +567,60 @@ class Job extends AbstractEntity {
/**
/**
* @return string
* @return string
*/
*/
public
function
getApplyExternalLink
()
{
public
function
getApplyExternalLink
()
:
string
{
return
$this
->
applyExternalLink
;
return
$this
->
applyExternalLink
;
}
}
/**
/**
* @param string $applyExternalLink
* @param string $applyExternalLink
*/
*/
public
function
setApplyExternalLink
(
string
$applyExternalLink
)
{
public
function
setApplyExternalLink
(
string
$applyExternalLink
)
:
void
{
$this
->
applyExternalLink
=
$applyExternalLink
;
$this
->
applyExternalLink
=
$applyExternalLink
;
}
}
/**
* @return ObjectStorage
*/
public
function
getExperienceLevel
():
ObjectStorage
{
if
(
$this
->
experienceLevel
instanceof
LazyLoadingProxy
)
{
$this
->
experienceLevel
->
_loadRealInstance
();
}
return
$this
->
experienceLevel
;
}
/**
* @param ObjectStorage $experienceLevel
*/
public
function
setExperienceLevel
(
ObjectStorage
$experienceLevel
):
void
{
$this
->
experienceLevel
=
$experienceLevel
;
}
/**
* @param ExperienceLevel $experienceLevel
* @return void
*/
public
function
addExperienceLevel
(
ExperienceLevel
$experienceLevel
):
void
{
if
(
$this
->
experienceLevel
instanceof
LazyLoadingProxy
)
{
$this
->
experienceLevel
->
_loadRealInstance
();
}
$this
->
experienceLevel
->
attach
(
$experienceLevel
);
}
/**
* @param ExperienceLevel $experienceLevel
* @return void
*/
public
function
removeExperienceLevel
(
ExperienceLevel
$experienceLevel
):
void
{
if
(
$this
->
experienceLevel
instanceof
LazyLoadingProxy
)
{
$this
->
experienceLevel
->
_loadRealInstance
();
}
$this
->
experienceLevel
->
detach
(
$experienceLevel
);
}
/**
/**
* @param ObjectStorage $relatedJobs
* @param ObjectStorage $relatedJobs
* @return void
* @return void
...
@@ -602,7 +632,7 @@ class Job extends AbstractEntity {
...
@@ -602,7 +632,7 @@ class Job extends AbstractEntity {
/**
/**
* @return ObjectStorage
* @return ObjectStorage
*/
*/
public
function
getRelatedJobs
()
{
public
function
getRelatedJobs
()
:
ObjectStorage
{
if
(
$this
->
relatedJobs
instanceof
LazyLoadingProxy
)
{
if
(
$this
->
relatedJobs
instanceof
LazyLoadingProxy
)
{
$this
->
relatedJobs
->
_loadRealInstance
();
$this
->
relatedJobs
->
_loadRealInstance
();
}
}
...
...
This diff is collapsed.
Click to expand it.
ext_tables.sql
+
2
−
3
View file @
669d5261
...
@@ -21,7 +21,7 @@ CREATE TABLE tx_sgjobs_domain_model_job (
...
@@ -21,7 +21,7 @@ CREATE TABLE tx_sgjobs_domain_model_job (
salary_unit
varchar
(
5
)
DEFAULT
''
NOT
NULL
,
salary_unit
varchar
(
5
)
DEFAULT
''
NOT
NULL
,
description
text
DEFAULT
''
NOT
NULL
,
description
text
DEFAULT
''
NOT
NULL
,
department
int
(
11
)
DEFAULT
'0'
NOT
NULL
,
department
int
(
11
)
DEFAULT
'0'
NOT
NULL
,
experience_level
int
(
11
)
DEFAULT
'0'
NOT
NULL
,
experience_level
varchar
(
255
)
DEFAULT
'0'
NOT
NULL
,
contact
int
(
11
)
unsigned
DEFAULT
'0'
NOT
NULL
,
contact
int
(
11
)
unsigned
DEFAULT
'0'
NOT
NULL
,
featured_offer
tinyint
(
4
)
unsigned
DEFAULT
'0'
NOT
NULL
,
featured_offer
tinyint
(
4
)
unsigned
DEFAULT
'0'
NOT
NULL
,
hide_apply_by_email
tinyint
(
4
)
unsigned
DEFAULT
'0'
NOT
NULL
,
hide_apply_by_email
tinyint
(
4
)
unsigned
DEFAULT
'0'
NOT
NULL
,
...
@@ -65,8 +65,7 @@ CREATE TABLE tx_sgjobs_domain_model_contact (
...
@@ -65,8 +65,7 @@ CREATE TABLE tx_sgjobs_domain_model_contact (
image
int
(
11
)
unsigned
DEFAULT
'0'
image
int
(
11
)
unsigned
DEFAULT
'0'
);
);
CREATE
TABLE
tx_sgjobs_domain_model_job_application
CREATE
TABLE
tx_sgjobs_domain_model_job_application
(
(
job_id
text
DEFAULT
''
NOT
NULL
,
job_id
text
DEFAULT
''
NOT
NULL
,
job
int
(
11
)
unsigned
DEFAULT
'0'
NOT
NULL
,
job
int
(
11
)
unsigned
DEFAULT
'0'
NOT
NULL
,
job_title
text
DEFAULT
''
NOT
NULL
,
job_title
text
DEFAULT
''
NOT
NULL
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment