Documentation

Company
in package

Company service.

Table of Contents

Properties

$aclService  : AclService
$bannerPackageMapper  : BannerPackage
$categoryMapper  : Category
$companyForm  : Company
$companyMapper  : Company
$editBannerPackageForm  : Package
$editCategoryForm  : JobCategory
$editFeaturedPackageForm  : Package
$editJobForm  : Job
$editLabelForm  : JobLabel
$editPackageForm  : Package
$featuredPackageMapper  : FeaturedPackage
$jobMapper  : Job
$jobUpdateMapper  : JobUpdate
$labelMapper  : Label
$packageMapper  : Package
$storageConfig  : array<string|int, mixed>
$storageService  : FileStorage
$translator  : Translator
$userService  : User

Methods

__construct()  : mixed
applyJobProposal()  : void
cancelJobProposal()  : void
createCompany()  : Company|bool
Inserts the company and initializes translations for the given languages.
createJob()  : Job|bool
Creates a new job and adds it to the specified package.
createJobCategory()  : JobCategory
Creates a new JobCategoryModel.
createJobLabel()  : JobLabel
Creates a new JobLabelModel.
createPackage()  : bool
Creates a new package, and assigns it to the given company.
deleteCompanyBySlug()  : void
Deletes the company identified with $slug.
deleteJob()  : void
Deletes the given job and its associated data.
deletePackage()  : void
Deletes the given package.
getCategoryForm()  : JobCategory
Get the Category Edit form.
getCompanyById()  : Company|null
Get public company by id.
getCompanyBySlugName()  : Company|null
Return the company identified by $slugName.
getCompanyForm()  : Company
getCompanyList()  : array<string|int, Company>
Returns a list of all companies (excluding hidden companies).
getCurrentBanner()  : CompanyBannerPackage|null
Returns a random banner for display on the frontpage.
getFeaturedPackage()  : CompanyFeaturedPackage|null
getHiddenCompanyList()  : array<string|int, Company>
Returns a list of all companies (including hidden companies).
getJobById()  : Job|null
Returns all jobs with a given slugname, owned by a company with $companySlugName.
getJobCategoryById()  : JobCategory|null
Returns a persistent category.
getJobCategoryBySlug()  : JobCategory|null
getJobForm()  : Job
Returns the form for entering jobs.
getJobLabelById()  : JobLabel|null
Returns a persistent label.
getLabelForm()  : JobLabel
Get the Label Edit form.
getPackageById()  : CompanyPackage|null
Returns a persistent package.
getPackageChangeEvents()  : array<string|int, mixed>
Searches for packages that change before $date.
getPackageForm()  : Package
Returns a the form for entering packages.
persistCompany()  : void
persistJob()  : void
Saves all modified jobs.
persistJobCategory()  : void
Saves the modified JobCategoryModel.
persistJobLabel()  : void
Saves the modified JobLabelModel.
persistPackage()  : void
Saves all modified packages.
resetJobApproval()  : void
setJobApproval()  : void
transferJobs()  : bool
Move jobs from an expired package to a non-expired package.
updateCompany()  : bool
Updates a company with the provided data.
updateJob()  : bool
updateJobCategory()  : void
updateJobLabel()  : void
Updates the JobLabelModel.
updatePackage()  : bool
Updates the package.
uploadImage()  : string
Upload an image to be displayed in a company or job description.
deleteJobAttachments()  : void
Remove the actual attachments from a job.
getFuturePackageExpiresBeforeDate()  : array<string|int, CompanyPackage>
getFuturePackageStartsBeforeDate()  : array<string|int, CompanyPackage>
uploadFile()  : bool
A function which uploads an image. Is used for uploading company logos, banner package banners, and attachments of jobs. It assumes that if the file is null (i.e. no image has been submitted) it should not touch the old file.

Properties

$editBannerPackageForm read-only

private Package $editBannerPackageForm

$editFeaturedPackageForm read-only

private Package $editFeaturedPackageForm

$storageConfig read-only

private array<string|int, mixed> $storageConfig

$translator read-only

private Translator $translator

Methods

__construct()

public __construct(AclService $aclService, Translator $translator, FileStorage $storageService, Company $companyMapper, Package $packageMapper, BannerPackage $bannerPackageMapper, FeaturedPackage $featuredPackageMapper, Job $jobMapper, JobUpdate $jobUpdateMapper, Category $categoryMapper, Label $labelMapper, Company $companyForm, Package $editPackageForm, Package $editBannerPackageForm, Package $editFeaturedPackageForm, Job $editJobForm, JobCategory $editCategoryForm, JobLabel $editLabelForm, User $userService, array<string|int, mixed> $storageConfig) : mixed
Parameters
$aclService : AclService
$translator : Translator
$storageService : FileStorage
$companyMapper : Company
$packageMapper : Package
$bannerPackageMapper : BannerPackage
$featuredPackageMapper : FeaturedPackage
$jobMapper : Job
$jobUpdateMapper : JobUpdate
$categoryMapper : Category
$labelMapper : Label
$companyForm : Company
$editPackageForm : Package
$editBannerPackageForm : Package
$editFeaturedPackageForm : Package
$editJobForm : Job
$editCategoryForm : JobCategory
$editLabelForm : JobLabel
$userService : User
$storageConfig : array<string|int, mixed>
Tags
psalm-param

PackageMapper<CompanyJobPackageModel> $packageMapper

phpcsSuppress

SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification

cancelJobProposal()

public cancelJobProposal(JobUpdate $jobUpdate, string $message) : void
Parameters
$jobUpdate : JobUpdate
$message : string

createCompany()

Inserts the company and initializes translations for the given languages.

public createCompany(array<string|int, mixed> $data) : Company|bool
Parameters
$data : array<string|int, mixed>
Tags
throws
ORMException
phpcsSuppress

SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification

Return values
Company|bool

createJob()

Creates a new job and adds it to the specified package.

public createJob(CompanyJobPackage $package, array<string|int, mixed> $data) : Job|bool
Parameters
$package : CompanyJobPackage
$data : array<string|int, mixed>
Tags
throws
ORMException
phpcsSuppress

SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification

Return values
Job|bool

createJobCategory()

Creates a new JobCategoryModel.

public createJobCategory(array<string|int, mixed> $data) : JobCategory
Parameters
$data : array<string|int, mixed>

Category data from the JobCategory form

Tags
phpcsSuppress

SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification

Return values
JobCategory

createJobLabel()

Creates a new JobLabelModel.

public createJobLabel(array<string|int, mixed> $data) : JobLabel
Parameters
$data : array<string|int, mixed>

Label data from the JobLabelForm

Tags
phpcsSuppress

SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification

Return values
JobLabel

createPackage()

Creates a new package, and assigns it to the given company.

public createPackage(Company $company, array<string|int, mixed> $data[, CompanyPackageTypes $type = CompanyPackageTypes::Job ]) : bool
Parameters
$company : Company
$data : array<string|int, mixed>
$type : CompanyPackageTypes = CompanyPackageTypes::Job
Tags
throws
Exception
phpcsSuppress

SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification

Return values
bool

deleteCompanyBySlug()

Deletes the company identified with $slug.

public deleteCompanyBySlug(string $slug) : void
Parameters
$slug : string
Tags
throws
ORMException

deleteJob()

Deletes the given job and its associated data.

public deleteJob(Job $job) : void
Parameters
$job : Job
Tags
throws
ORMException

getCompanyById()

Get public company by id.

public getCompanyById(int $id) : Company|null
Parameters
$id : int
Return values
Company|null

getCompanyBySlugName()

Return the company identified by $slugName.

public getCompanyBySlugName(string $slugName) : Company|null
Parameters
$slugName : string
Return values
Company|null

getCompanyList()

Returns a list of all companies (excluding hidden companies).

public getCompanyList() : array<string|int, Company>
Return values
array<string|int, Company>

getHiddenCompanyList()

Returns a list of all companies (including hidden companies).

public getHiddenCompanyList() : array<string|int, Company>
Return values
array<string|int, Company>

getJobById()

Returns all jobs with a given slugname, owned by a company with $companySlugName.

public getJobById(int $jobId) : Job|null
Parameters
$jobId : int
Return values
Job|null

getJobCategoryById()

Returns a persistent category.

public getJobCategoryById(int $jobCategoryId) : JobCategory|null
Parameters
$jobCategoryId : int
Return values
JobCategory|null

getJobCategoryBySlug()

public getJobCategoryBySlug(string $slug) : JobCategory|null
Parameters
$slug : string
Tags
throws
NonUniqueResultException
Return values
JobCategory|null

getJobForm()

Returns the form for entering jobs.

public getJobForm() : Job
Return values
Job

Job edit form

getJobLabelById()

Returns a persistent label.

public getJobLabelById(int $jobLabelId) : JobLabel|null
Parameters
$jobLabelId : int
Return values
JobLabel|null

getLabelForm()

Get the Label Edit form.

public getLabelForm() : JobLabel
Return values
JobLabel

Form for editing JobLabelModels

getPackageChangeEvents()

Searches for packages that change before $date.

public getPackageChangeEvents(DateTime $date) : array<string|int, mixed>
Parameters
$date : DateTime

The date until where to search

Tags
psalm-return

array{ 0: CompanyPackageModel[], 1: CompanyPackageModel[], } Two sorted arrays, containing the packages that respectively start and expire between now and $date

Return values
array<string|int, mixed>

persistCompany()

public persistCompany(Company $company) : void
Parameters
$company : Company
Tags
throws
ORMException

persistJob()

Saves all modified jobs.

public persistJob(Job $job) : void
Parameters
$job : Job
Tags
throws
ORMException

persistJobCategory()

Saves the modified JobCategoryModel.

public persistJobCategory(JobCategory $jobCategory) : void
Parameters
$jobCategory : JobCategory

persistJobLabel()

Saves the modified JobLabelModel.

public persistJobLabel(JobLabel $jobLabel) : void
Parameters
$jobLabel : JobLabel

resetJobApproval()

public resetJobApproval(Job $job) : void
Parameters
$job : Job

transferJobs()

Move jobs from an expired package to a non-expired package.

public transferJobs(array<string|int, mixed> $data) : bool
Parameters
$data : array<string|int, mixed>
Tags
phpcsSuppress

SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification

Return values
bool

updateCompany()

Updates a company with the provided data.

public updateCompany(Company $company, array<string|int, mixed> $data) : bool
Parameters
$company : Company
$data : array<string|int, mixed>
Tags
throws
Exception
phpcsSuppress

SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification

Return values
bool

updateJob()

public updateJob(Job $job, array<string|int, mixed> $data[, bool $applyProposal = false ]) : bool
Parameters
$job : Job
$data : array<string|int, mixed>
$applyProposal : bool = false
Tags
throws
ORMException
phpcsSuppress

SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification

Return values
bool

updateJobCategory()

public updateJobCategory(JobCategory $jobCategory, array<string|int, mixed> $data) : void
Parameters
$jobCategory : JobCategory

The JobCategoryModel to update

$data : array<string|int, mixed>

The (new) data to save

Tags
phpcsSuppress

SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification

updateJobLabel()

Updates the JobLabelModel.

public updateJobLabel(JobLabel $jobLabel, array<string|int, mixed> $data) : void
Parameters
$jobLabel : JobLabel
$data : array<string|int, mixed>

The data to validate, and apply to the label

Tags
phpcsSuppress

SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification

updatePackage()

Updates the package.

public updatePackage(CompanyPackage $package, array<string|int, mixed> $data) : bool
Parameters
$package : CompanyPackage
$data : array<string|int, mixed>
Tags
throws
Exception
phpcsSuppress

SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification

Return values
bool

uploadImage()

Upload an image to be displayed in a company or job description.

public uploadImage(Company $company, array<string|int, mixed> $files) : string
Parameters
$company : Company
$files : array<string|int, mixed>
Tags
phpcsSuppress

SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification

Return values
string

deleteJobAttachments()

Remove the actual attachments from a job.

private deleteJobAttachments(Job $job) : void
Parameters
$job : Job

getFuturePackageExpiresBeforeDate()

private getFuturePackageExpiresBeforeDate(DateTime $date) : array<string|int, CompanyPackage>
Parameters
$date : DateTime
Return values
array<string|int, CompanyPackage>

getFuturePackageStartsBeforeDate()

private getFuturePackageStartsBeforeDate(DateTime $date) : array<string|int, CompanyPackage>
Parameters
$date : DateTime
Return values
array<string|int, CompanyPackage>

uploadFile()

A function which uploads an image. Is used for uploading company logos, banner package banners, and attachments of jobs. It assumes that if the file is null (i.e. no image has been submitted) it should not touch the old file.

private uploadFile(Company|CompanyPackage|Job $entity, array<string|int, mixed>|null $file[, string $languageSuffix = '' ]) : bool
Parameters
$entity : Company|CompanyPackage|Job
$file : array<string|int, mixed>|null
$languageSuffix : string = ''
Tags
throws
Exception
phpcsSuppress

SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification

Return values
bool

        
On this page

Search results