Skip to content
Snippets Groups Projects
Commit 669d5261 authored by Kevin von Spiczak's avatar Kevin von Spiczak
Browse files

[TASK] allow multiple experience levels per job

parent ec49c1e3
No related branches found
No related tags found
1 merge request!46AZM changes
...@@ -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();
} }
......
...@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment