Job
in package
implements
ResourceInterface
uses
IdentifiableTrait, TimestampableTrait, ApprovableTrait, UpdateProposableTrait
Job model.
Tags
Attributes
- #[Entity]
- #[HasLifecycleCallbacks]
Table of Contents
Interfaces
- ResourceInterface
Properties
- $approvableText : ApprovableText|null
- When the entity has been approved/rejected a message can be attached. Since we do not always need this message it has been replaced with another entity which we can EXTRA_LAZY load to ensure it is not always included.
- $approved : ApprovableStatus
- State of the approval.
- $approvedAt : DateTime|null
- The date when the entity was approved.
- $approver : Member|null
- Who (dis)approved the entity using this trait?
- $attachment : CompanyLocalisedText
- The location(url) of an attachment describing the job.
- $category : JobCategory
- The job's category.
- $contactEmail : string|null
- The job's email.
- $contactName : string|null
- The job's contact's name.
- $contactPhone : string|null
- The job's phone.
- $createdAt : DateTime
- The date at which the entity was created.
- $description : CompanyLocalisedText
- The job's description.
- $id : int|null
- The default value must be `null` to prevent issues with auto generating the value. The column is strictly not nullable.
- $isUpdate : bool
- Whether this entity is a proposed update for another entity.
- $labels : Collection<string|int, JobLabel>
- Job labels.
- $location : CompanyLocalisedText
- The job's location.
- $name : CompanyLocalisedText
- The job's display name.
- $package : CompanyJobPackage
- The job's package.
- $published : bool
- The job's status.
- $slugName : string
- The job's slug name.
- $updatedAt : DateTime
- The date at which the entity was updated.
- $updateProposals : Collection<string|int, JobUpdate>
- Proposed updates to this job.
- $website : CompanyLocalisedText
- The job's website.
Methods
- __construct() : mixed
- addLabel() : void
- addLabels() : void
- getApprovableText() : ApprovableText|null
- getApproved() : ApprovableStatus
- getApprovedAt() : DateTime|null
- getApprover() : Member|null
- getAttachment() : CompanyLocalisedText
- Get the job's attachment.
- getCategory() : JobCategory
- Get the job's category.
- getCompany() : Company
- Get the job's company.
- getContactEmail() : string|null
- Get the job's contact's email.
- getContactName() : string|null
- Get the job's contact's name.
- getContactPhone() : string|null
- Get the job's contact's phone.
- getCreatedAt() : DateTime
- getDescription() : CompanyLocalisedText
- Get the job's description.
- getId() : int|null
- Get the identifier of the object.
- getIsUpdate() : bool
- Get whether this is a proposed update.
- getLabels() : Collection<string|int, JobLabel>
- Get the labels. Returns an array of JobLabelAssignments.
- getLocation() : CompanyLocalisedText
- Returns the job's location.
- getName() : CompanyLocalisedText
- Get the job's name.
- getPackage() : CompanyJobPackage
- Get the job's package.
- getResourceId() : string
- getSlugName() : string
- Get the job's slug name.
- getUpdatedAt() : DateTime
- getUpdateProposals() : Collection<string|int, JobUpdate>
- getWebsite() : CompanyLocalisedText
- Get the job's website.
- isActive() : bool
- isApproved() : bool
- isPublished() : bool
- Get the job's status.
- isUpdate() : bool
- Get whether this is a proposed update.
- prePersist() : void
- Automatically fill in the `DateTime`s before the initial call to `persist()`.
- preUpdate() : void
- Automatically update the `updatedAt` `DateTime` when doing an update to the entity.
- removeLabel() : void
- removeLabels() : void
- setApprovableText() : void
- setApproved() : void
- setApprovedAt() : void
- setApprover() : void
- setAttachment() : void
- Set the job's attachment.
- setCategory() : void
- Set the job's category.
- setContactEmail() : void
- Set the job's contact's email.
- setContactName() : void
- Set the job's contact's name.
- setContactPhone() : void
- Set the job's contact's phone.
- setDescription() : void
- Set the job's description.
- setId() : void
- Setting the identifier manually will, in most instances, result in undefined behaviour. Use with caution!
- setIsUpdate() : void
- Set whether this is a proposed update.
- setLocation() : void
- Sets the job's location.
- setName() : void
- Set the job's name.
- setPackage() : void
- setPublished() : void
- Set the job's status.
- setSlugName() : void
- Set the job's slug name.
- setWebsite() : void
- Set the job's website.
- toArray() : ImportedJobLabelArrayType[]}
- toGdprArray() : ApprovableTraitGdprArrayType
- setCreatedAt() : void
- setUpdatedAt() : void
Properties
$approvableText
When the entity has been approved/rejected a message can be attached. Since we do not always need this message it has been replaced with another entity which we can EXTRA_LAZY load to ensure it is not always included.
protected
ApprovableText|null
$approvableText
= null
Attributes
- #[JoinColumn]
- $name: 'approvableText_id'
- $referencedColumnName: 'id'
- $nullable: true
- #[OneToOne]
- $targetEntity: \Application\Model\ApprovableText::class
- $cascade: ['persist', 'remove']
- $fetch: 'EXTRA_LAZY'
- $orphanRemoval: true
$approved
State of the approval.
protected
ApprovableStatus
$approved
Attributes
- #[Column]
- $type: 'integer'
- $enumType: \Application\Model\Enums\ApprovableStatus::class
$approvedAt
The date when the entity was approved.
protected
DateTime|null
$approvedAt
= null
Attributes
- #[Column]
- $type: 'datetime'
- $nullable: true
$approver
Who (dis)approved the entity using this trait?
protected
Member|null
$approver
= null
Attributes
- #[JoinColumn]
- $referencedColumnName: 'lidnr'
- #[ManyToOne]
- $targetEntity: \Decision\Model\Member::class
$attachment
The location(url) of an attachment describing the job.
protected
CompanyLocalisedText
$attachment
Attributes
- #[JoinColumn]
- $name: 'attachment_id'
- $referencedColumnName: 'id'
- $nullable: false
- #[OneToOne]
- $targetEntity: \Company\Model\CompanyLocalisedText::class
- $cascade: ['persist', 'remove']
- $orphanRemoval: true
$category
The job's category.
protected
JobCategory
$category
Attributes
- #[JoinColumn]
- $name: 'category_id'
- $referencedColumnName: 'id'
- $nullable: false
- #[ManyToOne]
- $targetEntity: \Company\Model\JobCategory::class
$contactEmail
The job's email.
protected
string|null
$contactEmail
Attributes
- #[Column]
- $type: 'string'
- $nullable: true
$contactName
The job's contact's name.
protected
string|null
$contactName
Attributes
- #[Column]
- $type: 'string'
- $nullable: true
$contactPhone
The job's phone.
protected
string|null
$contactPhone
Attributes
- #[Column]
- $type: 'string'
- $nullable: true
$createdAt
The date at which the entity was created.
protected
DateTime
$createdAt
Attributes
- #[Column]
- $type: 'datetime'
$description
The job's description.
protected
CompanyLocalisedText
$description
Attributes
- #[JoinColumn]
- $name: 'description_id'
- $referencedColumnName: 'id'
- $nullable: false
- #[OneToOne]
- $targetEntity: \Company\Model\CompanyLocalisedText::class
- $cascade: ['persist', 'remove']
- $orphanRemoval: true
$id
The default value must be `null` to prevent issues with auto generating the value. The column is strictly not nullable.
protected
int|null
$id
= null
Attributes
- #[Column]
- $type: 'integer'
- #[GeneratedValue]
- $strategy: 'IDENTITY'
- #[Id]
$isUpdate
Whether this entity is a proposed update for another entity.
protected
bool
$isUpdate
= false
Attributes
- #[Column]
- $type: 'boolean'
$labels
Job labels.
protected
Collection<string|int, JobLabel>
$labels
Attributes
- #[JoinTable]
- $name: 'JobLabelAssignment'
- #[ManyToMany]
- $targetEntity: \Company\Model\JobLabel::class
- $inversedBy: 'jobs'
- $cascade: ['persist']
$location
The job's location.
protected
CompanyLocalisedText
$location
Attributes
- #[JoinColumn]
- $name: 'location_id'
- $referencedColumnName: 'id'
- $nullable: false
- #[OneToOne]
- $targetEntity: \Company\Model\CompanyLocalisedText::class
- $cascade: ['persist', 'remove']
- $orphanRemoval: true
$name
The job's display name.
protected
CompanyLocalisedText
$name
Attributes
- #[JoinColumn]
- $name: 'name_id'
- $referencedColumnName: 'id'
- $nullable: false
- #[OneToOne]
- $targetEntity: \Company\Model\CompanyLocalisedText::class
- $cascade: ['persist', 'remove']
- $orphanRemoval: true
$package
The job's package.
protected
CompanyJobPackage
$package
Attributes
- #[JoinColumn]
- $name: 'package_id'
- $referencedColumnName: 'id'
- $nullable: false
- #[ManyToOne]
- $targetEntity: \Company\Model\CompanyJobPackage::class
- $inversedBy: 'jobs'
$published
The job's status.
protected
bool
$published
Attributes
- #[Column]
- $type: 'boolean'
$slugName
The job's slug name.
protected
string
$slugName
Attributes
- #[Column]
- $type: 'string'
$updatedAt
The date at which the entity was updated.
protected
DateTime
$updatedAt
Attributes
- #[Column]
- $type: 'datetime'
$updateProposals
Proposed updates to this job.
protected
Collection<string|int, JobUpdate>
$updateProposals
Attributes
- #[OneToMany]
- $targetEntity: \Company\Model\Proposals\JobUpdate::class
- $mappedBy: 'original'
- $cascade: ['persist', 'remove']
- $orphanRemoval: true
- $fetch: 'EXTRA_LAZY'
$website
The job's website.
protected
CompanyLocalisedText
$website
Attributes
- #[JoinColumn]
- $name: 'website_id'
- $referencedColumnName: 'id'
- $nullable: false
- #[OneToOne]
- $targetEntity: \Company\Model\CompanyLocalisedText::class
- $cascade: ['persist', 'remove']
- $orphanRemoval: true
Methods
__construct()
public
__construct() : mixed
addLabel()
public
addLabel(JobLabel $label) : void
Parameters
- $label : JobLabel
addLabels()
public
addLabels(array<string|int, JobLabel> $labels) : void
Parameters
- $labels : array<string|int, JobLabel>
getApprovableText()
public
getApprovableText() : ApprovableText|null
Return values
ApprovableText|nullgetApproved()
public
getApproved() : ApprovableStatus
Return values
ApprovableStatusgetApprovedAt()
public
getApprovedAt() : DateTime|null
Return values
DateTime|nullgetApprover()
public
getApprover() : Member|null
Return values
Member|nullgetAttachment()
Get the job's attachment.
public
getAttachment() : CompanyLocalisedText
Return values
CompanyLocalisedTextgetCategory()
Get the job's category.
public
getCategory() : JobCategory
Return values
JobCategorygetCompany()
Get the job's company.
public
getCompany() : Company
Return values
CompanygetContactEmail()
Get the job's contact's email.
public
getContactEmail() : string|null
Return values
string|nullgetContactName()
Get the job's contact's name.
public
getContactName() : string|null
Return values
string|nullgetContactPhone()
Get the job's contact's phone.
public
getContactPhone() : string|null
Return values
string|nullgetCreatedAt()
public
getCreatedAt() : DateTime
Return values
DateTimegetDescription()
Get the job's description.
public
getDescription() : CompanyLocalisedText
Return values
CompanyLocalisedTextgetId()
Get the identifier of the object.
public
getId() : int|null
Tags
Return values
int|nullgetIsUpdate()
Get whether this is a proposed update.
public
getIsUpdate() : bool
Return values
boolgetLabels()
Get the labels. Returns an array of JobLabelAssignments.
public
getLabels() : Collection<string|int, JobLabel>
Return values
Collection<string|int, JobLabel>getLocation()
Returns the job's location.
public
getLocation() : CompanyLocalisedText
The location property specifies for which location (i.e. city or country) this job is intended. This location may not be equal to the company's address.
Return values
CompanyLocalisedTextgetName()
Get the job's name.
public
getName() : CompanyLocalisedText
Return values
CompanyLocalisedTextgetPackage()
Get the job's package.
public
getPackage() : CompanyJobPackage
Return values
CompanyJobPackagegetResourceId()
public
getResourceId() : string
Return values
stringgetSlugName()
Get the job's slug name.
public
getSlugName() : string
Return values
string —the Jobs slug name
getUpdatedAt()
public
getUpdatedAt() : DateTime
Return values
DateTimegetUpdateProposals()
public
getUpdateProposals() : Collection<string|int, JobUpdate>
Return values
Collection<string|int, JobUpdate>getWebsite()
Get the job's website.
public
getWebsite() : CompanyLocalisedText
Return values
CompanyLocalisedTextisActive()
public
isActive() : bool
Return values
boolisApproved()
public
isApproved() : bool
Return values
boolisPublished()
Get the job's status.
public
isPublished() : bool
Return values
boolisUpdate()
Get whether this is a proposed update.
public
isUpdate() : bool
Return values
boolprePersist()
Automatically fill in the `DateTime`s before the initial call to `persist()`.
public
prePersist() : void
Attributes
- #[PrePersist]
preUpdate()
Automatically update the `updatedAt` `DateTime` when doing an update to the entity.
public
preUpdate() : void
Attributes
- #[PreUpdate]
removeLabel()
public
removeLabel(JobLabel $label) : void
Parameters
- $label : JobLabel
removeLabels()
public
removeLabels(array<string|int, JobLabel> $labels) : void
Parameters
- $labels : array<string|int, JobLabel>
setApprovableText()
public
setApprovableText(ApprovableText|null $approvableText) : void
Parameters
- $approvableText : ApprovableText|null
setApproved()
public
setApproved(ApprovableStatus $approved) : void
Parameters
- $approved : ApprovableStatus
setApprovedAt()
public
setApprovedAt(DateTime|null $approvedAt) : void
Parameters
- $approvedAt : DateTime|null
setApprover()
public
setApprover(Member|null $approver) : void
Parameters
- $approver : Member|null
setAttachment()
Set the job's attachment.
public
setAttachment(CompanyLocalisedText $attachment) : void
Parameters
- $attachment : CompanyLocalisedText
setCategory()
Set the job's category.
public
setCategory(JobCategory $category) : void
Parameters
- $category : JobCategory
setContactEmail()
Set the job's contact's email.
public
setContactEmail(string|null $contactEmail) : void
Parameters
- $contactEmail : string|null
setContactName()
Set the job's contact's name.
public
setContactName(string|null $name) : void
Parameters
- $name : string|null
setContactPhone()
Set the job's contact's phone.
public
setContactPhone(string|null $contactPhone) : void
Parameters
- $contactPhone : string|null
setDescription()
Set the job's description.
public
setDescription(CompanyLocalisedText $description) : void
Parameters
- $description : CompanyLocalisedText
setId()
Setting the identifier manually will, in most instances, result in undefined behaviour. Use with caution!
public
setId(int|null $id) : void
Parameters
- $id : int|null
setIsUpdate()
Set whether this is a proposed update.
public
setIsUpdate(bool $isUpdate) : void
Parameters
- $isUpdate : bool
setLocation()
Sets the job's location.
public
setLocation(CompanyLocalisedText $location) : void
Parameters
- $location : CompanyLocalisedText
setName()
Set the job's name.
public
setName(CompanyLocalisedText $name) : void
Parameters
- $name : CompanyLocalisedText
setPackage()
public
setPackage(CompanyJobPackage $package) : void
Parameters
- $package : CompanyJobPackage
setPublished()
Set the job's status.
public
setPublished(bool $published) : void
Parameters
- $published : bool
setSlugName()
Set the job's slug name.
public
setSlugName(string $name) : void
Parameters
- $name : string
setWebsite()
Set the job's website.
public
setWebsite(CompanyLocalisedText $website) : void
Parameters
- $website : CompanyLocalisedText
toArray()
public
toArray() : ImportedJobLabelArrayType[]}
Return values
ImportedJobLabelArrayType[]}toGdprArray()
public
toGdprArray() : ApprovableTraitGdprArrayType
Return values
ApprovableTraitGdprArrayTypesetCreatedAt()
private
setCreatedAt(DateTime $createdAt) : void
Parameters
- $createdAt : DateTime
setUpdatedAt()
private
setUpdatedAt(DateTime $updatedAt) : void
Parameters
- $updatedAt : DateTime