<?php
namespace App\Entity;
use App\Annotations\JobPositionMappingProperty;
use App\Annotations\Seo as SEO;
use App\Component\Attributes\Attribute\AttributeAware;
use App\Component\Attributes\AttributeAwareInterface;
use App\Component\Attributes\AttributeAwareTrait;
use App\Component\ExternalIntegration\Entity\ExternalIntegrationTrait;
use App\Model\Location as LocationModel;
use App\Robots\Robots;
use App\Robots\RobotsInterFace;
use App\Util\BreadcrumbableInterface;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Gedmo\Translatable\Translatable;
use JMS\Serializer\Annotation as JMS;
use JMS\Serializer\Annotation\Groups;
use Money\Currency;
use Money\Money;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Component\Routing\RouterInterface;
use Symfony\Component\Serializer\Annotation\Ignore;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Vacancy.
*
* @ORM\Table(name="vacancy", indexes={
* @ORM\Index(name="active", columns={"active"}),
* @ORM\Index(name="deleted", columns={"deleted"}),
* @ORM\Index(name="featured", columns={"featured"}),
* }, uniqueConstraints={
* @ORM\UniqueConstraint(columns={"external_reference", "external_id"})
* })
* @ORM\Entity(repositoryClass="App\Entity\Repository\VacancyRepository")
* @Gedmo\TranslationEntity(class="App\Entity\Translation\VacancyTranslation")
* @JMS\ExclusionPolicy("all")
* @Gedmo\SoftDeleteable(fieldName="deleted", hardDelete=false)
*/
#[AttributeAware(attributeClass: VacancyAttribute::class)]
#[UniqueEntity(['externalReference', 'externalId'], 'External id / reference combination is already used')]
class Vacancy implements Searchable, BreadcrumbableInterface, OpenGraphInterface, AddressAwareInterface, Taggable, Translatable, SiteAwareInterface, DomainAwareInterface, MultiMediaInterface, ApplicationProcessAwareInterface, AttributeAwareInterface, RobotsInterFace
{
use AddressAwareTrait;
use AttributeAwareTrait;
use CalendarTrait;
use ExternalIntegrationTrait;
use GalleryTrait;
use MetaTrait;
use OpenGraphTrait;
use SiteAwareTrait;
use UtmTrait;
public const NOTIFIED_NOT = 0;
public const NOTIFIED_ON_CREATION = 1;
public const NOTIFIED_HALF_TIME = 2;
public const SALARY_UNITS = [
'HOUR',
'DAY',
'WEEK',
'MONTH',
'YEAR',
];
public const VACANCY_LIFESPAN_DAYS = 60;
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
* @JMS\Expose()
*
* @SEO\Meta(name="identifier")
*/
private $id;
/**
* @var bool
*
* @ORM\Column(name="active", type="boolean")
*
* @deprecated Will be remove in favor for business logic in repository
*/
private $active = true;
/**
* @var \DateTime|null
*
* @Gedmo\Timestampable(on="create")
* @ORM\Column(type="datetime", nullable=true)
* @JMS\Expose()
* @JobPositionMappingProperty\Date
*
* @SEO\Meta
*/
private $created;
/**
* @var \Datetime|null
*
* @Gedmo\Timestampable(on="update")
* @ORM\Column(type="datetime", nullable=true)
* @JMS\Expose()
* @JobPositionMappingProperty\Date
*
* @SEO\Meta
*/
private $updated;
/**
* @var \DateTime|null
* @Gedmo\Timestampable(on="create")
* @ORM\Column(type="datetime", nullable=true)
* @JobPositionMappingProperty\Date
*/
private $sortDate;
/**
* @var string
*
* @ORM\Column(name="contact_person", type="string", nullable=true, length=170)
* @JMS\Expose()
* @Groups({"Webservice"})
* @JobPositionMappingProperty\Text
*/
#[Assert\Length(max: 170)]
protected $contactPerson;
/**
* @var PhoneNumber|null
* @ORM\Column(name="contact_person_phone", type="phone_number", nullable=true)
*
* @JMS\Expose()
* @JMS\Type("App\Entity\PhoneNumber")
* @Groups({"Webservice"})
*
* @JobPositionMappingProperty\Text
*/
protected $contactPersonPhone;
/**
* @var string
* @Gedmo\Slug(fields={"title"}, updatable=true)
* @ORM\Column(length=170, unique=true)
* @Gedmo\Translatable
* @JMS\Expose()
* @SEO\Meta()
*/
#[Assert\Length(max: 170)]
protected $slug;
/**
* @var string
* @ORM\Column(name="title", type="string", length=170)
* @JMS\Expose()
* @Groups({"Webservice"})
* @Gedmo\Translatable
* @SEO\Meta()
* @JobPositionMappingProperty\Text
*/
#[Assert\Length(max: 170)]
#[Assert\NotBlank]
private $title;
/**
* @var array
*
* Non-persistent, only for view data
* Introduced to store subtitle information like searchfilters that would be removed by the VacancyDecorator
*/
private array $subTitle = [];
/**
* @var string|null
* @JMS\Expose()
* @Groups({"Webservice"})
* @ORM\Column(name="company_name", type="string", nullable=true)
*/
private $companyName;
/**
* @ORM\OneToOne(targetEntity="Asset", cascade={"persist"})
* @ORM\JoinColumn(name="detail_image_asset_id", nullable=true, onDelete="SET NULL")
* @JMS\Expose()
* @JobPositionMappingProperty\Image
*
* @var Asset|null
*/
private $detailImage;
/**
* @ORM\OneToOne(targetEntity="App\Entity\Asset", cascade={"persist"}, fetch="EAGER")
* @ORM\JoinColumn(name="overview_image_asset_id", nullable=true, onDelete="SET NULL")
* @JMS\Expose()
* @JobPositionMappingProperty\Image
*
* @var Asset|null
*/
private $overviewImage;
/**
* @ORM\OneToOne(targetEntity="Asset", cascade={"persist"})
* @ORM\JoinColumn(name="hero_image_asset_id", nullable=true, onDelete="SET NULL")
* @JMS\Expose()
* @JobPositionMappingProperty\Image
*
* @var Asset|null
*/
private $heroImage;
/**
* @var string
* @ORM\Column(name="city", type="string", length=170, nullable=true)
* @JMS\Expose()
* @Groups({"Webservice"})
* @SEO\Meta()
* @JobPositionMappingProperty\Text
*/
#[Assert\Length(max: 170)]
private $city;
/**
* @var string
* @ORM\Column(name="zipcode", type="string", length=10, nullable=true)
* @JMS\Expose()
* @Groups({"Webservice"})
* @SEO\Meta()
* @JobPositionMappingProperty\Text
*/
#[Assert\Length(max: 10)]
private $zipcode;
/**
* @var string
* @ORM\Column(name="external_url", type="string", length=512, nullable=true)
* @JMS\Expose()
* @Groups({"Webservice"})
* @JobPositionMappingProperty\Text
*/
#[Assert\Length(max: 255)]
#[Assert\Url]
private $externalUrl;
/**
* @var string
*
* @ORM\Column(name="intro", type="text", nullable=true)
* @JMS\Expose()
* @Groups({"Webservice"})
* @Gedmo\Translatable
* @SEO\Meta()
* @JobPositionMappingProperty\Text
*/
private $intro;
/**
* @var string
*
* @JMS\SerializedName("formatted_description")
*
* @ORM\Column(name="description", type="text", nullable=true)
* @Gedmo\Translatable
* @JMS\Expose()
* @Groups({"Webservice"})
* @JobPositionMappingProperty\Text
*/
private $description;
/**
* Many Vacancies have One Company.
*
* @var Company
*
* @ORM\ManyToOne(targetEntity="App\Entity\Company", inversedBy="vacancies", fetch="EAGER")
* @JMS\Expose()
* @Groups({"Webservice"})
*
* @SEO\Meta(supersededBy="companyName")
*/
private $company;
/**
* One Vacancy has Many Applicants.
*
* @var Vacancy[]|ArrayCollection
*
* @ORM\OneToMany(targetEntity="App\Entity\Applicant", mappedBy="vacancy", fetch="LAZY")
*/
private $applicants;
/**
* Many Vacancies have One Recruiter.
*
* @var Recruiter
*
* @ORM\ManyToOne(targetEntity="App\Entity\Recruiter", inversedBy="vacancies", fetch="EAGER", cascade={"persist"})
* @ORM\JoinColumn(name="recruiter_id", referencedColumnName="id", onDelete="SET NULL")
* @JMS\Expose()
* @Groups({"Webservice"})
*/
private $recruiter;
/**
* Many Vacancies has One OptionValue.
*
* @var OptionValue
*
* @ORM\ManyToOne(targetEntity="App\Entity\OptionValue")
* @ORM\OrderBy({"position": "ASC"})
* @JMS\Expose()
*/
private $mainIcon;
/**
* Many Vacancies has Many OptionValues.
*
* @var OptionValue[]|ArrayCollection
*
* @ORM\ManyToMany(targetEntity="App\Entity\OptionValue", inversedBy="vacancies")
* @ORM\JoinTable(name="vacancy_option_value_option")
* @ORM\OrderBy({"position": "ASC"})
* @JMS\Expose()
* @Groups({"Webservice"})
*/
private $optionValues;
/**
* Many Vacancies have Many VacancyUspValues.
*
* @var VacancyUspValue[]|ArrayCollection
*
* @ORM\ManyToMany(targetEntity="App\Entity\VacancyUspValue", inversedBy="vacancies")
* @ORM\JoinTable(name="vacancy_usp_value_usp")
* @JMS\Expose()
*/
private $vacancyUspValues;
/**
* Many Vacancies has Many USP's.
*
* @var USP[]|ArrayCollection
*
* @ORM\ManyToMany(targetEntity="App\Entity\USP", inversedBy="vacancies")
* @ORM\JoinTable(name="vacancy_usp_option")
* @JMS\Expose()
*/
private $usps;
/**
* @var USP|null
* @ORM\ManyToOne(targetEntity="App\Entity\USP", cascade={"persist"})
*/
private $uspSubTitle;
/**
* @var VacancyDescriptionForm|null
*
* @ORM\ManyToOne(targetEntity="App\Entity\VacancyDescriptionForm")
*/
private $descriptionForm;
/**
* @var bool
* @ORM\Column(type="boolean")
* @JMS\Expose()
*/
private $featured = false;
/**
* @var bool
* @ORM\Column(type="boolean")
* @JMS\Expose()
*/
private $internalVacancy = false;
/**
* @var \DateTime|null
* @ORM\Column(type="datetime", nullable=true)
* @JMS\Expose()
* @Groups({"Webservice"})
* @JobPositionMappingProperty\Date
*
* @SEO\Meta
*/
private $startDate = null;
/**
* @var \DateTime|null
* @ORM\Column(type="datetime", nullable=true)
* @JMS\Expose()
* @Groups({"Webservice"})
* @JobPositionMappingProperty\Date
*
* @SEO\Meta
*/
private $endDate = null;
/**
* @ORM\Column(type=Types::DATETIME_MUTABLE, nullable=true)]
* @JobPositionMappingProperty\Date
* @SEO\Meta
*/
#[JMS\Expose, Groups(['Webservice'])]
private ?\DateTime $jobStartDate = null;
/**
* Many Vacancies have One ApplicantForm.
*
* @var ApplicantForm|null
*
* @ORM\ManyToOne(targetEntity="App\Entity\ApplicantForm")
*/
private $applicantForm;
/**
* Many Vacancies have One Custom ApplicantForm.
*
* @var ApplicantForm|null
*
* @ORM\ManyToOne(targetEntity="App\Entity\ApplicantForm", cascade={"persist"})
*/
private $customApplicantForm;
/**
* @var bool|null
*
* @ORM\Column(type="boolean", nullable=true)
*/
private $applicantFormCustom;
/**
* @ORM\Column(type="string", length=170, nullable=true)
*
* @var string
* @JMS\Expose()
* @Groups({"Webservice"})
* @JobPositionMappingProperty\Text
*/
#[Assert\Length(max: 170)]
private $applicantEmail;
/**
* @var \DateTime|null
*
* @ORM\Column(name="deleted", type="datetime", nullable=true)
*/
private $deleted;
/**
* @var string|null
* @ORM\Column(name="external_reference", nullable=true, length=170)
* @JMS\Expose()
* @Groups({"Webservice"})
* @SEO\Meta
*/
#[Assert\Length(max: 170)]
private $externalReference;
/**
* @var bool
*
* @ORM\Column(name="synced", type="boolean")
*/
private $synced = false;
/**
* @var Invoice|null
* @ORM\OneToOne(targetEntity="App\Entity\Invoice", cascade={"persist"})
*/
private $invoice;
/**
* @var string|null
* @ORM\Column(name="youtube", nullable=true, length=170)
*
* @JMS\Expose()
* @Groups({"Webservice"})
* @JobPositionMappingProperty\Text
*/
#[Assert\Length(max: 170)]
private $youtube;
/**
* @var string|null
* @ORM\Column(type="string", length=170, nullable=true)
* @JMS\Expose()
* @Groups({"Webservice"})
* @SEO\Meta
* @JobPositionMappingProperty\Text
*/
#[Assert\Length(max: 170)]
private $externalId;
/**
* For external ATS services, the displayed id differs from the id to fetch the vacancy for
* this is the case for OTYS.
*
* @var string|null
* @ORM\Column(type="string", length=170, nullable=true, name="displayable_external_id")
* @SEO\Meta
*/
#[Assert\Length(max: 170)]
private $displayableExternalId;
/**
* One Vacancy has Many Intermediaries.
*
* @var Vacancy[]|ArrayCollection
*
* @ORM\OneToMany(targetEntity="App\Entity\Intermediary", mappedBy="vacancy", fetch="LAZY")
*/
private $intermediaries;
/**
* One Vacancy has Many VacancyQuestions.
*
* @var VacancyQuestion[]|ArrayCollection|null
*
* @ORM\OneToMany(targetEntity="VacancyQuestion", mappedBy="vacancy", cascade={"persist",
* "remove"}, orphanRemoval=true)
*/
private $vacancyQuestions;
/**
* Many Vacancies has Many Managers.
*
* @var User[]|ArrayCollection
*
* @ORM\ManyToMany(targetEntity="App\Entity\User")
* @ORM\JoinTable(name="vacancy_managers")
*/
private $managers;
/**
* @var string
* @ORM\Column(name="master_vacancy", type="string", length=170, nullable=true)
* @JMS\Expose()
* @Groups({"Webservice"})
*/
#[Assert\Length(max: 170)]
private $masterVacancyId;
/**
* @var bool
*
* @JMS\Type("bool")
* @JMS\Expose()
*/
private $new = false;
/**
* @var bool
*/
private $canApply = true;
/**
* @var Tag[]|Collection
*
* @ORM\ManyToMany(targetEntity="Tag")
* @ORM\JoinTable(name="vacancy_tags",
* joinColumns={@ORM\JoinColumn(name="vacancy_id", referencedColumnName="id")},
* inverseJoinColumns={@ORM\JoinColumn(name="tag_id", referencedColumnName="id")})
*/
private $tags;
/**
* @var string|null
*
* @ORM\Column(type="string", nullable=true)
* @JMS\Expose()
* @Groups({"Webservice"})
* @SEO\Meta
* @JobPositionMappingProperty\Text
*/
#[Assert\Length(max: 255)]
private $country;
/**
* @var Site[]|Collection
*
* @ORM\ManyToMany(targetEntity="Site", inversedBy="vacancies")
* @ORM\JoinTable(name="vacancy_findable_sites")
*/
private $sitesToFindOn;
/**
* @var Synonym[]|Collection
*
* @ORM\ManyToMany(targetEntity="Synonym")
* @ORM\JoinTable(name="vacancy_synonyms",
* joinColumns={@ORM\JoinColumn(name="vacancy_id", referencedColumnName="id")},
* inverseJoinColumns={@ORM\JoinColumn(name="synonym_id", referencedColumnName="id")})
*/
private $synonyms;
/**
* @var int
*
* @ORM\Column(name="salary_amount", type="integer", nullable=true)
* @JMS\Expose()
* @Groups({"Webservice"})
*/
private $salaryAmount;
/**
* @var string
*
* @ORM\Column(name="salary_currency", type="string", length=64, nullable=true)
* @JMS\Expose()
* @Groups({"Webservice"})
* @JobPositionMappingProperty\Text
*/
private $salaryCurrency;
/**
* @var int
*
* @ORM\Column(name="min_salary_amount", type="integer", nullable=true)
* @JMS\Expose()
* @Groups({"Webservice"})
*/
#[Ignore]
private $minSalaryAmount;
/**
* @var string
*
* @ORM\Column(name="min_salary_currency", type="string", length=64, nullable=true)
* @JMS\Expose()
* @Groups({"Webservice"})
*/
#[Ignore]
private $minSalaryCurrency;
/**
* @var int
*
* @ORM\Column(name="max_salary_amount", type="integer", nullable=true)
* @JMS\Expose()
* @Groups({"Webservice"})
*/
#[Ignore]
private $maxSalaryAmount;
/**
* @var string
*
* @ORM\Column(name="max_salary_currency", type="string", length=64, nullable=true)
* @JMS\Expose()
* @Groups({"Webservice"})
*/
#[Ignore]
private $maxSalaryCurrency;
/**
* @var string|null
*
* @JMS\Expose()
*
* @ORM\Column(type="string", nullable=true)
*/
#[Assert\Length(max: 255)]
private $customSalary;
/**
* @var LocationModel
*/
private $location;
/**
* @var int
*
* @ORM\Column(type="integer", name="redirect_count")
*/
private $redirectCount = 0;
/**
* @var string|null
*
* @ORM\Column(type="string", nullable=true)
* @JMS\Expose()
* @Groups({"Webservice"})
* @SEO\Meta
* @JobPositionMappingProperty\Text
*/
#[Assert\Length(max: 255)]
private $province;
/**
* @var string|null
*
* @ORM\Column(type="text", nullable=true)
* @JMS\Expose()
* @Groups({"Webservice"})
* @JobPositionMappingProperty\Text
*/
private $companyInformation;
/**
* @var VacancyTemplate|null
*
* @ORM\ManyToOne(targetEntity="VacancyTemplate", inversedBy="vacancies")
*/
private $template;
/**
* @var TopJob[]|null
*
* @ORM\OneToMany(targetEntity="App\Entity\TopJob", mappedBy="vacancy")
*/
private $topJobs;
/**
* Many Vacancies have Many Knockout Questions.
*
* @var KnockoutQuestion[]|ArrayCollection
*
* @ORM\ManyToMany(targetEntity="App\Entity\KnockoutQuestion", inversedBy="vacancies")
* @ORM\JoinTable(name="vacancy_knockout_questions")
* @JMS\Expose()
*/
private $knockoutQuestions;
/**
* @var bool
*
* @ORM\Column(type="boolean", options={"default" : 1})
*/
private $hasMoreInfoButton = true;
/**
* @var Option[]|null
*/
protected $groupedOptions;
/**
* @ORM\OneToOne(targetEntity="Asset", cascade={"persist"}, fetch="EAGER")
* @ORM\JoinColumn(name="company_logo_asset_id", nullable=true, onDelete="SET NULL")
* @JMS\Expose()
* @JobPositionMappingProperty\Image
*
* @var Asset|null
*/
private $companyLogo;
/**
* Many Vacancies have One MultiPoster.
*
* @var MultiPoster
*
* @ORM\ManyToOne(targetEntity="App\Entity\MultiPoster", inversedBy="vacancies")
* @JMS\Expose()
*/
private $multiPoster;
/**
* One Vacancy has Many CallMeBackRequests.
*
* @var CallMeBackRequest[]|ArrayCollection
*
* @ORM\OneToMany(targetEntity="App\Entity\CallMeBackRequest", mappedBy="vacancy", fetch="LAZY")
*/
private $callMeBackRequests;
/**
* @var bool
*
* @ORM\Column(type="integer", name="owner_notified")
*/
private $ownerNotified = self::NOTIFIED_NOT;
/**
* @var string|null
*
* @ORM\Column(name="`function`",type="string", nullable=true)
* @JobPositionMappingProperty\Text
*/
private $function;
/**
* @var SiteBlock[]|Collection
*
* @ORM\ManyToMany(targetEntity="App\Entity\SiteBlock")
* @ORM\JoinTable(name="vacancy_sidebar_siteblocks")
*/
private $sidebarSiteBlocks;
/**
* @var OptionValue|null
*
* @ORM\ManyToOne(targetEntity="App\Entity\OptionValue")
*/
private $primaryDiscipline;
/**
* @var OptionValue|null
*
* @ORM\ManyToOne(targetEntity="App\Entity\OptionValue")
*/
private $secundaryDiscipline;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\HarverExperience")
*/
private $harverExperience;
/**
* @var string|null
* @JMS\Expose
* @JMS\SerializedName("detail_url")
* @JMS\Type("string")
*/
private $detailUrl;
/**
* @ORM\Column(type="string", length=512, nullable=true)
*/
private $externalDetailUrl;
/**
* @ORM\ManyToOne(targetEntity=ApplicationProcessItemCollection::class, inversedBy="vacancies")
*/
private ?ApplicationProcessItemCollection $applicationProcess = null;
/**
* @var VacancyDomain
*
* @ORM\ManyToOne(targetEntity=VacancyDomain::class, inversedBy="vacancies")
*/
private $domain;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $googleForJobMapping;
/**
* @ORM\Column(type="string", length=20, nullable=true)
* @JobPositionMappingProperty\Text
*/
private $salaryUnit;
/**
* @ORM\Column(type="string", nullable=true)
*/
private $department;
/**
* Non-persistent array to be populated postload depending on configuration.
*/
private array $overviewImages = [];
/**
* Vacancy constructor.
*/
public function __construct()
{
$this->applicants = new ArrayCollection();
$this->optionValues = new ArrayCollection();
$this->usps = new ArrayCollection();
$this->vacancyQuestions = new ArrayCollection();
$this->vacancyUspValues = new ArrayCollection();
$this->managers = new ArrayCollection();
$this->tags = new ArrayCollection();
$this->sitesToFindOn = new ArrayCollection();
$this->synonyms = new ArrayCollection();
$this->topJobs = new ArrayCollection();
$this->knockoutQuestions = new ArrayCollection();
$this->sidebarSiteBlocks = new ArrayCollection();
$this->intermediaries = new ArrayCollection();
$this->callMeBackRequests = new ArrayCollection();
$this->labels = new ArrayCollection();
}
public function __clone()
{
$this->id = null;
$this->slug = null;
$this->applicants = new ArrayCollection();
$this->invoice = null;
$this->detailImage = null;
$this->heroImage = null;
$this->ogImage = null;
$this->overviewImage = null;
$this->companyLogo = null;
$this->created = new \DateTime();
$this->startDate = new \DateTime();
$this->endDate = null;
}
public function getId(): ?int
{
return $this->id;
}
public function isActive(): bool
{
return $this->active;
}
public function setActive(bool $active): self
{
$this->active = $active;
return $this;
}
public function getTitle(): ?string
{
return $this->title;
}
public function setTitle(string $title): self
{
$this->title = $title;
return $this;
}
public function getSubTitle(): array
{
return $this->subTitle;
}
public function setSubTitle(array $subTitle): self
{
$this->subTitle = $subTitle;
return $this;
}
public function getCompanyName(): ?string
{
return $this->companyName;
}
public function setCompanyName(?string $companyName): self
{
$this->companyName = $companyName;
return $this;
}
public function getCompanyDisplayName(): string
{
if (!empty($this->companyName)) {
return $this->companyName;
}
if ($this->company) {
return $this->company->getName();
}
return '';
}
public function getDetailImage(): ?Asset
{
return $this->detailImage;
}
public function setDetailImage(?Asset $detailImage): self
{
$this->detailImage = $detailImage;
return $this;
}
public function getOverviewImage(): ?Asset
{
return $this->overviewImage;
}
public function setOverviewImage(?Asset $overviewImage): self
{
$this->overviewImage = $overviewImage;
return $this;
}
public function getHeroImage(): ?Asset
{
return $this->heroImage;
}
public function setHeroImage(?Asset $heroImage): self
{
$this->heroImage = $heroImage;
return $this;
}
public function getCity(): ?string
{
return $this->city;
}
public function setCity(?string $city): self
{
$this->city = $city;
return $this;
}
public function getZipcode(): ?string
{
return $this->zipcode;
}
public function setZipcode(?string $zipcode): self
{
$this->zipcode = $zipcode;
return $this;
}
public function getExternalUrl(): ?string
{
return $this->externalUrl;
}
public function setExternalUrl(?string $externalUrl): self
{
$this->externalUrl = $externalUrl;
return $this;
}
public function getIntro(): ?string
{
return $this->intro;
}
public function setIntro(?string $intro): self
{
$this->intro = $intro;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
public function getDescriptionForm(): ?VacancyDescriptionForm
{
return $this->descriptionForm;
}
public function setDescriptionForm(?VacancyDescriptionForm $descriptionForm): self
{
$this->descriptionForm = $descriptionForm;
return $this;
}
public function __toString(): string
{
return (string) $this->getTitle();
}
public function getCompany(): ?Company
{
return $this->company;
}
public function setCompany(?Company $company): self
{
$this->company = $company;
return $this;
}
public function getRecruiter(): ?Recruiter
{
return $this->recruiter;
}
public function setRecruiter(?Recruiter $recruiter): self
{
$this->recruiter = $recruiter;
return $this;
}
public function getSlug(): ?string
{
return $this->slug;
}
public function setSlug(string $slug): self
{
$this->slug = $slug;
return $this;
}
/**
* @return Collection|Applicant[]
*/
public function getApplicants(): ?Collection
{
return $this->applicants;
}
/**
* @param ArrayCollection|Vacancy[] $applicants
*
* @return Vacancy
*/
public function setApplicants($applicants)
{
$this->applicants = $applicants;
return $this;
}
public function getMainIcon(): ?OptionValue
{
return $this->mainIcon;
}
public function setMainIcon(?OptionValue $mainIcon): self
{
$this->mainIcon = $mainIcon;
return $this;
}
/**
* @return Collection|OptionValue[]
*/
public function getOptionValues(): ?Collection
{
return $this->optionValues;
}
public function addOptionValue(OptionValue $optionValue): self
{
if (!$this->optionValues->contains($optionValue)) {
$this->optionValues[] = $optionValue;
}
return $this;
}
public function removeOptionValue(OptionValue $optionValue): self
{
if ($this->optionValues->contains($optionValue)) {
$this->optionValues->removeElement($optionValue);
}
return $this;
}
public function removeOptionValues(): self
{
$this->optionValues = new ArrayCollection();
return $this;
}
/**
* @param $optionValues
*/
public function setOptionValues($optionValues): self
{
$this->optionValues = $optionValues;
return $this;
}
/**
* @return Collection|VacancyUspValue[]
*/
public function getVacancyUspValues(): ?Collection
{
return $this->vacancyUspValues;
}
public function addVacancyUspValue(VacancyUspValue $vacancyUspValue): self
{
if (!$this->vacancyUspValues->contains($vacancyUspValue)) {
$this->vacancyUspValues[] = $vacancyUspValue;
}
return $this;
}
public function removeVacancyUspValue(VacancyUspValue $vacancyUspValue): self
{
if ($this->vacancyUspValues->contains($vacancyUspValue)) {
$this->vacancyUspValues->removeElement($vacancyUspValue);
}
return $this;
}
/**
* @param $vacancyUspValues
*/
public function setVacancyUspValues($vacancyUspValues): self
{
$this->vacancyUspValues = $vacancyUspValues;
return $this;
}
/**
* @return Collection|USP[]
*/
public function getUsps(): ?Collection
{
return $this->usps;
}
public function addUsp(USP $usp): self
{
if (!$this->usps->contains($usp)) {
$this->usps[] = $usp;
}
return $this;
}
public function removeUsp(USP $usp): self
{
if ($this->usps->contains($usp)) {
$this->usps->removeElement($usp);
}
return $this;
}
public function getUspSubTitle(): ?USP
{
return $this->uspSubTitle;
}
public function setUspSubTitle(?USP $uspSubTitle): self
{
$this->uspSubTitle = $uspSubTitle;
return $this;
}
public function isFeatured(): bool
{
return $this->featured;
}
public function setFeatured(bool $featured): self
{
$this->featured = $featured;
return $this;
}
public function isInternalVacancy(): bool
{
return $this->internalVacancy;
}
public function setInternalVacancy(bool $internalVacancy): self
{
$this->internalVacancy = $internalVacancy;
return $this;
}
public function getStartDate(): ?\DateTimeInterface
{
return $this->startDate;
}
public function setStartDate(?\DateTimeInterface $startDate): self
{
$this->startDate = $startDate;
return $this;
}
public function getEndDate(): ?\DateTimeInterface
{
return $this->endDate;
}
public function setEndDate(?\DateTimeInterface $endDate): self
{
$this->endDate = $endDate;
return $this;
}
public function getCreated(): ?\DateTimeInterface
{
return $this->created;
}
public function setCreated(?\DateTimeInterface $created): self
{
$this->created = $created;
return $this;
}
public function getUpdated(): ?\DateTimeInterface
{
return $this->updated;
}
public function setUpdated(?\DateTimeInterface $updated): self
{
$this->updated = $updated;
return $this;
}
public function getJobStartDate(): ?\DateTimeInterface
{
return $this->jobStartDate;
}
public function setJobStartDate(?\DateTimeInterface $jobStartDate): self
{
$this->jobStartDate = $jobStartDate;
return $this;
}
public function getApplicantForm(): ?ApplicantForm
{
return $this->applicantForm;
}
public function setApplicantForm(?ApplicantForm $applicantForm): self
{
$this->applicantForm = $applicantForm;
return $this;
}
public function getCustomApplicantForm(): ?ApplicantForm
{
return $this->customApplicantForm;
}
public function setCustomApplicantForm(?ApplicantForm $customApplicantForm): self
{
$this->customApplicantForm = $customApplicantForm;
return $this;
}
public function getApplicantEmail(): ?string
{
return $this->applicantEmail;
}
public function setApplicantEmail(?string $applicantEmail): self
{
$this->applicantEmail = $applicantEmail;
return $this;
}
public function getDeleted(): ?\DateTimeInterface
{
return $this->deleted;
}
public function setDeleted(?\DateTimeInterface $deleted): self
{
$this->deleted = $deleted;
return $this;
}
public function isSynced(): bool
{
return $this->synced;
}
public function setSynced(bool $synced): self
{
$this->synced = $synced;
return $this;
}
public function getContactPerson(): ?string
{
return $this->contactPerson;
}
public function setContactPerson(?string $contactPerson): self
{
$this->contactPerson = $contactPerson;
return $this;
}
public function getContactPersonPhone(): ?PhoneNumber
{
return $this->contactPersonPhone;
}
public function setContactPersonPhone(?PhoneNumber $contactPersonPhone): self
{
$this->contactPersonPhone = $contactPersonPhone;
return $this;
}
public function getInvoice(): ?Invoice
{
return $this->invoice;
}
public function setInvoice(?Invoice $invoice): self
{
$this->invoice = $invoice;
return $this;
}
public static function getSearchableFields(): array
{
return ['title', 'intro', 'description'];
}
public function getBreadcrumbTitle(): ?string
{
return (string) $this->title;
}
public function getYoutube(): ?string
{
return $this->youtube;
}
public function setYoutube(?string $youtube): self
{
$this->youtube = $youtube;
return $this;
}
public function getDisplayableExternalId(): ?string
{
return $this->displayableExternalId;
}
public function setDisplayableExternalId(?string $displayableExternalId): self
{
$this->displayableExternalId = $displayableExternalId;
return $this;
}
public function isDeleted(): bool
{
return null !== $this->deleted;
}
public function isPublished(): bool
{
$currentDateTime = new \DateTime();
return
$this->isActive() &&
!$this->isDeleted() &&
(!$this->getStartDate() || ($currentDateTime->getTimestamp() >= $this->getStartDate()->getTimeStamp())) &&
(!$this->getEndDate() || ($currentDateTime->getTimestamp() <= $this->getEndDate()->getTimeStamp()));
}
/**
* @return Collection|Tag[]
*/
public function getTags(): Collection
{
return $this->tags;
}
public function addTag(Tag $tag): self
{
if (!$this->tags->contains($tag)) {
$this->tags[] = $tag;
}
return $this;
}
public function removeTag(Tag $tag): self
{
if ($this->tags->contains($tag)) {
$this->tags->removeElement($tag);
}
return $this;
}
public function removeTags(): self
{
$this->tags = new ArrayCollection();
return $this;
}
/**
* @return Collection|VacancyQuestion[]|null
*/
public function getVacancyQuestions(): ?Collection
{
return $this->vacancyQuestions;
}
public function addVacancyQuestion(VacancyQuestion $vacancyQuestion): self
{
if (!$this->vacancyQuestions->contains($vacancyQuestion)) {
$this->vacancyQuestions[] = $vacancyQuestion;
$vacancyQuestion->setVacancy($this);
}
return $this;
}
public function removeVacancyQuestion(VacancyQuestion $vacancyQuestion): self
{
if ($this->vacancyQuestions->contains($vacancyQuestion)) {
$this->vacancyQuestions->removeElement($vacancyQuestion);
// set the owning side to null (unless already changed)
if ($vacancyQuestion->getVacancy() === $this) {
$vacancyQuestion->setVacancy(null);
}
}
return $this;
}
/**
* @return Collection|User[]
*/
public function getManagers(): ?Collection
{
return $this->managers;
}
public function addManager(User $manager): self
{
if (!$this->managers->contains($manager)) {
$this->managers[] = $manager;
}
return $this;
}
public function removeManager(User $manager): self
{
if ($this->managers->contains($manager)) {
$this->managers->removeElement($manager);
}
return $this;
}
/**
* @param $managers
*/
public function setManagers($managers): self
{
$this->managers = $managers;
return $this;
}
public function getMasterVacancyId(): ?string
{
return $this->masterVacancyId;
}
public function setMasterVacancyId(?string $masterVacancyId): self
{
$this->masterVacancyId = $masterVacancyId;
return $this;
}
public function isNew(): bool
{
return $this->new;
}
public function setNew(bool $new): self
{
$this->new = $new;
return $this;
}
public function canApply(): bool
{
return $this->canApply;
}
public function setCanApply(bool $canApply): self
{
$this->canApply = $canApply;
return $this;
}
public function getCountry(): ?string
{
return $this->country;
}
public function setCountry(?string $country): self
{
$this->country = $country;
return $this;
}
/**
* @return Collection|Site[]
*/
public function getSitesToFindOn(): ?Collection
{
return $this->sitesToFindOn;
}
public function addSiteToFindOn(Site $site): self
{
if (!$this->sitesToFindOn->contains($site)) {
$this->sitesToFindOn->add($site);
}
return $this;
}
public function removeSiteToFindOn(Site $site): self
{
if ($this->sitesToFindOn->contains($site)) {
$this->sitesToFindOn->removeElement($site);
}
return $this;
}
/**
* @return Collection|Synonym[]
*/
public function getSynonyms(): ?Collection
{
return $this->synonyms;
}
public function addSynonym(Synonym $synonym): self
{
if (!$this->synonyms->contains($synonym)) {
$this->synonyms[] = $synonym;
}
return $this;
}
public function removeSynonym(Synonym $synonym): self
{
if ($this->synonyms->contains($synonym)) {
$this->synonyms->removeElement($synonym);
}
return $this;
}
public function getLocation(): LocationModel
{
if (null === $this->location) {
$this->location = new LocationModel($this->address, $this->city, $this->zipcode, $this->country);
}
return $this->location;
}
public function getSalary(): Money
{
if (!$this->salaryCurrency) {
$this->salaryCurrency = 'EUR';
}
if (!$this->salaryAmount) {
return new Money(0, new Currency($this->salaryCurrency));
}
return new Money($this->salaryAmount, new Currency($this->salaryCurrency));
}
public function setSalary(?Money $salary): self
{
$this->salaryAmount = $salary?->getAmount();
$this->salaryCurrency = $salary?->getCurrency()->getCode();
return $this;
}
public function getMinSalary(): Money
{
if (!$this->minSalaryCurrency) {
$this->minSalaryCurrency = 'EUR';
}
if (!$this->minSalaryAmount) {
return new Money(0, new Currency($this->minSalaryCurrency));
}
return new Money($this->minSalaryAmount, new Currency($this->minSalaryCurrency));
}
public function setMinSalary(?Money $salary): self
{
$this->minSalaryAmount = $salary?->getAmount();
$this->minSalaryCurrency = $salary?->getCurrency()->getCode();
return $this;
}
public function getMaxSalary(): Money
{
if (!$this->maxSalaryCurrency) {
$this->maxSalaryCurrency = 'EUR';
}
if (!$this->maxSalaryAmount) {
return new Money(0, new Currency($this->maxSalaryCurrency));
}
return new Money($this->maxSalaryAmount, new Currency($this->maxSalaryCurrency));
}
public function setMaxSalary(?Money $salary): self
{
$this->maxSalaryAmount = $salary?->getAmount();
$this->maxSalaryCurrency = $salary?->getCurrency()->getCode();
return $this;
}
public function getCustomSalary(): ?string
{
return $this->customSalary;
}
public function setCustomSalary(?string $customSalary): self
{
$this->customSalary = $customSalary;
return $this;
}
public function getSortDate(): ?\DateTimeInterface
{
return $this->sortDate;
}
public function setSortDate(?\DateTimeInterface $sortDate): self
{
$this->sortDate = $sortDate;
return $this;
}
public function getRedirectCount(): ?int
{
return $this->redirectCount;
}
public function addRedirect(): self
{
++$this->redirectCount;
return $this;
}
public function getProvince(): ?string
{
return $this->province;
}
public function setProvince(?string $province): self
{
$this->province = $province;
return $this;
}
public function getCompanyInformation(): ?string
{
return $this->companyInformation;
}
public function setCompanyInformation(?string $companyInformation): self
{
$this->companyInformation = $companyInformation;
return $this;
}
public function getTemplate(): ?VacancyTemplate
{
return $this->template;
}
public function setTemplate(?VacancyTemplate $template): self
{
$this->template = $template;
return $this;
}
/**
* @return Collection|TopJob[]
*/
public function getTopJobs(): ?Collection
{
return $this->topJobs;
}
public function addTopJob(TopJob $topJob): self
{
if (!$this->topJobs->contains($topJob)) {
$this->topJobs[] = $topJob;
$topJob->setVacancy($this);
}
return $this;
}
public function removeTopJob(TopJob $topJob): self
{
if ($this->topJobs->contains($topJob)) {
$this->topJobs->removeElement($topJob);
// set the owning side to null (unless already changed)
if ($topJob->getVacancy() === $this) {
$topJob->setVacancy(null);
}
}
return $this;
}
/**
* @return Collection|KnockoutQuestion[]
*/
public function getKnockoutQuestions(): ?Collection
{
return $this->knockoutQuestions;
}
/**
* @param KnockoutQuestion[]|ArrayCollection $knockoutQuestions
*
* @return Vacancy
*/
public function setKnockoutQuestions($knockoutQuestions)
{
$this->knockoutQuestions = $knockoutQuestions;
return $this;
}
public function isHasMoreInfoButton(): bool
{
return $this->hasMoreInfoButton;
}
public function setHasMoreInfoButton(bool $hasMoreInfoButton): self
{
$this->hasMoreInfoButton = $hasMoreInfoButton;
return $this;
}
/**
* @return Option[]|null
*/
public function getGroupedOptions(): ?array
{
return $this->groupedOptions;
}
/**
* @param Option[]|null $groupedOptions
*/
public function setGroupedOptions(?array $groupedOptions): self
{
$this->groupedOptions = $groupedOptions;
return $this;
}
public function getCompanyLogo(): ?Asset
{
if (!$this->companyLogo && $company = $this->getCompany()) {
return $company->getLogo();
}
return $this->companyLogo;
}
public function setCompanyLogo(?Asset $companyLogo): self
{
$this->companyLogo = $companyLogo;
return $this;
}
public function getMultiPoster(): ?MultiPoster
{
return $this->multiPoster;
}
public function setMultiPoster(?MultiPoster $multiPoster): self
{
$this->multiPoster = $multiPoster;
return $this;
}
public function isApplicantFormCustom(): ?bool
{
return $this->applicantFormCustom;
}
public function setApplicantFormCustom(bool $applicantFormCustom): self
{
$this->applicantFormCustom = $applicantFormCustom;
return $this;
}
/**
* @return Collection|CallMeBackRequest[]
*/
public function getCallMeBackRequests(): ?Collection
{
return $this->callMeBackRequests;
}
/**
* @param CallMeBackRequest[]|ArrayCollection $callMeBackRequests
*
* @return Vacancy
*/
public function setCallMeBackRequests($callMeBackRequests)
{
$this->callMeBackRequests = $callMeBackRequests;
return $this;
}
public function isOwnerNotified(): int
{
return $this->ownerNotified;
}
public function setOwnerNotified(int $ownerNotified): self
{
$this->ownerNotified = $ownerNotified;
return $this;
}
/**
* @return array|string[]
*/
public function getAdditionalLocationFields(): array
{
return [
'zipcode',
'city',
];
}
public function getFunction(): ?string
{
return $this->function;
}
public function setFunction(?string $function): self
{
$this->function = $function;
return $this;
}
/**
* @return Collection|SiteBlock[]
*/
public function getSidebarSiteBlocks(): ?Collection
{
return $this->sidebarSiteBlocks;
}
/**
* @param SiteBlock[]|Collection $sidebarSiteBlocks
*
* @return Vacancy
*/
public function setSidebarSiteBlocks($sidebarSiteBlocks)
{
$this->sidebarSiteBlocks = $sidebarSiteBlocks;
return $this;
}
public function addSidebarSiteBlock(SiteBlock $sidebarSiteBlock): self
{
if (!$this->sidebarSiteBlocks->contains($sidebarSiteBlock)) {
$this->sidebarSiteBlocks[] = $sidebarSiteBlock;
}
return $this;
}
public function removeSidebarSiteBlock(SiteBlock $sidebarSiteBlock): self
{
if ($this->sidebarSiteBlocks->contains($sidebarSiteBlock)) {
$this->sidebarSiteBlocks->removeElement($sidebarSiteBlock);
}
return $this;
}
public function getPrimaryDiscipline(): ?OptionValue
{
return $this->primaryDiscipline;
}
public function setPrimaryDiscipline(?OptionValue $primaryDiscipline): self
{
$this->primaryDiscipline = $primaryDiscipline;
return $this;
}
public function getSecundaryDiscipline(): ?OptionValue
{
return $this->secundaryDiscipline;
}
public function setSecundaryDiscipline(?OptionValue $secundaryDiscipline): self
{
$this->secundaryDiscipline = $secundaryDiscipline;
return $this;
}
public function getHarverExperience(): ?HarverExperience
{
return $this->harverExperience;
}
public function setHarverExperience(?HarverExperience $harverExperience): self
{
$this->harverExperience = $harverExperience;
return $this;
}
public function getActive(): ?bool
{
return $this->active;
}
public function getFeatured(): ?bool
{
return $this->featured;
}
public function getApplicantFormCustom(): ?bool
{
return $this->applicantFormCustom;
}
public function getSynced(): ?bool
{
return $this->synced;
}
public function getSalaryAmount(): ?int
{
return $this->salaryAmount;
}
public function setSalaryAmount(?int $salaryAmount): self
{
$this->salaryAmount = $salaryAmount;
return $this;
}
public function getSalaryCurrency(): ?string
{
return $this->salaryCurrency;
}
public function setSalaryCurrency(?string $salaryCurrency): self
{
$this->salaryCurrency = $salaryCurrency;
return $this;
}
public function setRedirectCount(int $redirectCount): self
{
$this->redirectCount = $redirectCount;
return $this;
}
public function getHasMoreInfoButton(): ?bool
{
return $this->hasMoreInfoButton;
}
public function getOwnerNotified(): ?int
{
return $this->ownerNotified;
}
public function addApplicant(Applicant $applicant): self
{
if (!$this->applicants->contains($applicant)) {
$this->applicants[] = $applicant;
$applicant->setVacancy($this);
}
return $this;
}
public function removeApplicant(Applicant $applicant): self
{
if ($this->applicants->contains($applicant)) {
$this->applicants->removeElement($applicant);
// set the owning side to null (unless already changed)
if ($applicant->getVacancy() === $this) {
$applicant->setVacancy(null);
}
}
return $this;
}
/**
* @return Collection|Intermediary[]
*/
public function getIntermediaries(): ?Collection
{
return $this->intermediaries;
}
public function addIntermediary(Intermediary $intermediary): self
{
if (!$this->intermediaries->contains($intermediary)) {
$this->intermediaries[] = $intermediary;
$intermediary->setVacancy($this);
}
return $this;
}
public function removeIntermediary(Intermediary $intermediary): self
{
if ($this->intermediaries->contains($intermediary)) {
$this->intermediaries->removeElement($intermediary);
// set the owning side to null (unless already changed)
if ($intermediary->getVacancy() === $this) {
$intermediary->setVacancy(null);
}
}
return $this;
}
public function addSitesToFindOn(Site $sitesToFindOn): self
{
if (!$this->sitesToFindOn->contains($sitesToFindOn)) {
$this->sitesToFindOn[] = $sitesToFindOn;
}
return $this;
}
public function removeSitesToFindOn(Site $sitesToFindOn): self
{
if ($this->sitesToFindOn->contains($sitesToFindOn)) {
$this->sitesToFindOn->removeElement($sitesToFindOn);
}
return $this;
}
public function addKnockoutQuestion(KnockoutQuestion $knockoutQuestion): self
{
if (!$this->knockoutQuestions->contains($knockoutQuestion)) {
$this->knockoutQuestions[] = $knockoutQuestion;
}
return $this;
}
public function removeKnockoutQuestion(KnockoutQuestion $knockoutQuestion): self
{
if ($this->knockoutQuestions->contains($knockoutQuestion)) {
$this->knockoutQuestions->removeElement($knockoutQuestion);
}
return $this;
}
public function addCallMeBackRequest(CallMeBackRequest $callMeBackRequest): self
{
if (!$this->callMeBackRequests->contains($callMeBackRequest)) {
$this->callMeBackRequests[] = $callMeBackRequest;
$callMeBackRequest->setVacancy($this);
}
return $this;
}
public function removeCallMeBackRequest(CallMeBackRequest $callMeBackRequest): self
{
if ($this->callMeBackRequests->contains($callMeBackRequest)) {
$this->callMeBackRequests->removeElement($callMeBackRequest);
// set the owning side to null (unless already changed)
if ($callMeBackRequest->getVacancy() === $this) {
$callMeBackRequest->setVacancy(null);
}
}
return $this;
}
public function getDetailUrl(): ?string
{
return $this->detailUrl;
}
public function setDetailUrl(?string $detailUrl): self
{
$this->detailUrl = $detailUrl;
return $this;
}
public function getExternalDetailUrl(): ?string
{
return $this->externalDetailUrl;
}
public function setExternalDetailUrl(?string $externalDetailUrl): self
{
$this->externalDetailUrl = $externalDetailUrl;
return $this;
}
public function getApplicationProcess(): ?ApplicationProcessItemCollection
{
return $this->applicationProcess;
}
public function setApplicationProcess(?ApplicationProcessItemCollection $applicationProcess): self
{
$this->applicationProcess = $applicationProcess;
return $this;
}
public function getDomain(): ?VacancyDomain
{
return $this->domain;
}
public function setDomain(?VacancyDomain $domain): self
{
$this->domain = $domain;
return $this;
}
public function isIndexable(): bool
{
if (!$this->domain) {
return true;
}
return $this->domain->isIndexable();
}
public function getGoogleForJobMapping(): ?string
{
return $this->googleForJobMapping;
}
public function setGoogleForJobMapping(?string $googleForJobMapping): self
{
$this->googleForJobMapping = $googleForJobMapping;
return $this;
}
public function getSalaryUnit(): ?string
{
return $this->salaryUnit;
}
public function setSalaryUnit(?string $salaryUnit): self
{
$this->salaryUnit = $salaryUnit;
return $this;
}
public function getDepartment(): ?string
{
return $this->department;
}
public function setDepartment(?string $department): self
{
$this->department = $department;
return $this;
}
public function removeVacancyUspValues(): self
{
$this->vacancyUspValues = new ArrayCollection();
return $this;
}
public function getOverviewImages(): array
{
return $this->overviewImages;
}
public function setOverviewImages(array $overviewImages): self
{
$this->overviewImages = $overviewImages;
return $this;
}
/**
* @var string|null
*
* @ORM\Column(type="array", nullable=true)
*/
private $googleCloudName = [];
/**
* @ORM\ManyToMany(targetEntity=Tag::class)
* @ORM\JoinTable(name="vacancy_label")
*/
private $labels;
public function getGoogleCloudName(): ?array
{
return $this->googleCloudName;
}
public function setGoogleCloudName(?array $googleCloudName): self
{
$this->googleCloudName = $googleCloudName;
return $this;
}
/**
* @return Collection|Tag[]
*/
public function getLabels(): Collection
{
return $this->labels;
}
public function addLabel(Tag $label): self
{
if (!$this->labels->contains($label)) {
$this->labels[] = $label;
}
return $this;
}
public function removeLabel(Tag $label): self
{
$this->labels->removeElement($label);
return $this;
}
public function getRobots(): Robots
{
if (!$this->isActive() || $this->isDeleted() || !$this->isIndexable()) {
return Robots::ROBOTS_NOINDEX_NOFOLLOW;
}
return Robots::ROBOTS_INDEX_FOLLOW;
}
public function softDelete(): void
{
$this
->setDeleted(new \DateTime())
->setExternalHash(null);
}
public function shouldBeSkipped(string $hash): bool
{
return !$this->isDeleted() && $this->externalHash === $hash;
}
public function getResourceUri(
RouterInterface $router,
int $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH
): string {
return $router->generate(
'vacancy_detail',
[
'id' => $this->id,
'slug' => $this->slug,
],
$referenceType
);
}
}