From ff7fd9d657fb3edf477c4baf7defa75ad1e6622d Mon Sep 17 00:00:00 2001 From: Mathias Gelhausen Date: Thu, 12 Oct 2017 16:00:08 +0200 Subject: [PATCH] [Jobs] Allow using of alternate company name --- module/Jobs/src/Jobs/Entity/Job.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/module/Jobs/src/Jobs/Entity/Job.php b/module/Jobs/src/Jobs/Entity/Job.php index 40932b598..911615139 100644 --- a/module/Jobs/src/Jobs/Entity/Job.php +++ b/module/Jobs/src/Jobs/Entity/Job.php @@ -402,14 +402,16 @@ public function setTitle($title) * Gets the name oof the company. If there is an organization assigned to the * job posting. Take the name of the organization. * - * (non-PHPdoc) + * @param bool $useOrganizationEntity Get the name from the organization entity, if it is available. * @see \Jobs\Entity\JobInterface::getCompany() + * @return string */ - public function getCompany() + public function getCompany($useOrganizationEntity = true) { - if ($this->organization) { + if ($this->organization && $useOrganizationEntity) { return $this->organization->getOrganizationName()->getName(); } + return $this->company; }