Documentation

JobLabel
in package
uses IdentifiableTrait

Job Label model.

Tags
psalm-type

JobLabelArrayType = array{ id: int, name: ?string, nameEn: ?string, abbreviation: ?string, abbreviationEn: ?string, }

Attributes
#[Entity]

Table of Contents

Properties

$abbreviation  : CompanyLocalisedText
The abbreviation of the label.
$id  : int|null
The default value must be `null` to prevent issues with auto generating the value. The column is strictly not nullable.
$jobs  : Collection<string|int, Job>
The Assignments this Label belongs to.
$name  : CompanyLocalisedText
The name of the label.

Methods

__construct()  : mixed
addJob()  : void
getAbbreviation()  : CompanyLocalisedText
Gets the slug.
getId()  : int|null
Get the identifier of the object.
getJobs()  : Collection<string|int, Job>
Gets the jobs associated with this label.
getName()  : CompanyLocalisedText
Gets the name.
removeJob()  : void
setAbbreviation()  : void
Sets the slug.
setId()  : void
Setting the identifier manually will, in most instances, result in undefined behaviour. Use with caution!
setName()  : void
Sets the name.
toArray()  : JobLabelArrayType

Properties

$abbreviation

The abbreviation of the label.

protected CompanyLocalisedText $abbreviation
Attributes
#[JoinColumn]
$name: 'abbreviation_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]

$jobs

The Assignments this Label belongs to.

protected Collection<string|int, Job> $jobs
Attributes
#[ManyToMany]
$targetEntity: \Company\Model\Job::class
$mappedBy: 'labels'
$cascade: ['persist']

$name

The name of the label.

protected CompanyLocalisedText $name
Attributes
#[JoinColumn]
$name: 'name_id'
$referencedColumnName: 'id'
$nullable: false
#[OneToOne]
$targetEntity: \Company\Model\CompanyLocalisedText::class
$cascade: ['persist', 'remove']
$orphanRemoval: true

Methods

__construct()

public __construct() : mixed

getId()

Get the identifier of the object.

public getId() : int|null
Tags
psalm-ignore-nullable-return
Return values
int|null

getJobs()

Gets the jobs associated with this label.

public getJobs() : Collection<string|int, Job>
Return values
Collection<string|int, Job>

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

toArray()

public toArray() : JobLabelArrayType
Return values
JobLabelArrayType

        
On this page

Search results