Skip to content
Snippets Groups Projects
Commit 2041fa77 authored by Stefan Galinski's avatar Stefan Galinski :video_game:
Browse files

[BUGFIX] Fix completely broken contact adress integration

parent a1edced2
No related branches found
No related tags found
No related merge requests found
......@@ -33,24 +33,24 @@ use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
*/
class Company extends AbstractEntity {
/**
* @var string $zip
* @var string $jobId
*/
protected $zip = '';
protected $jobId = '';
/**
* @var string $city
* @var string $name
*/
protected $city = '';
protected $name = '';
/**
* @var string $jobId
* @var string $zip
*/
protected $jobId = '';
protected $zip = '';
/**
* @var string $name
* @var string $city
*/
protected $name = '';
protected $city = '';
/**
* @var string $street
......
......@@ -59,6 +59,31 @@ class Contact extends AbstractEntity {
*/
protected $phone = '';
/**
* @var string $zip
*/
protected $zip = '';
/**
* @var string $city
*/
protected $city = '';
/**
* @var string $street
*/
protected $street = '';
/**
* @var string $state
*/
protected $state = '';
/**
* @var string $country
*/
protected $country = '';
/**
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
* @var FileReference
......@@ -152,4 +177,74 @@ class Contact extends AbstractEntity {
return $this->image;
}
/**
* @return string
*/
public function getCity() {
return $this->city;
}
/**
* @param string $city
*/
public function setCity(string $city) {
$this->city = $city;
}
/**
* @return string
*/
public function getState() {
return $this->state;
}
/**
* @param string $state
*/
public function setState(string $state) {
$this->state = $state;
}
/**
* @return string
*/
public function getCountry() {
return $this->country;
}
/**
* @param string $country
*/
public function setCountry(string $country) {
$this->country = $country;
}
/**
* @return string
*/
public function getStreet() {
return $this->street;
}
/**
* @param string $street
*/
public function setStreet(string $street) {
$this->street = $street;
}
/**
* @return string
*/
public function getZip() {
return $this->zip;
}
/**
* @param string $zip
*/
public function setZip($zip) {
$this->zip = $zip;
}
}
......@@ -100,11 +100,42 @@
{job.company.contact.title} {job.company.contact.firstName} {job.company.contact.lastName}<br>
</f:else>
</f:if>
{job.company.street}<br>
<f:if condition="{job.company.state}">
{job.company.state}<br>
<f:if condition="{job.contact} && {job.contact.street}">
<f:then>
{job.contact.street}<br>
<f:if condition="{job.contact.state}">
{job.contact.state}<br>
</f:if>
{job.contact.zip} {job.contact.city}
<f:if condition="{job.contact.country}">
<br>{job.contact.country}
</f:if>
</f:then>
<f:else>
<f:if condition="{job.company.contact} && {job.company.contact.street}">
<f:then>
{job.company.contact.street}<br>
<f:if condition="{job.company.contact.state}">
{job.company.contact.state}<br>
</f:if>
{job.company.contact.zip} {job.company.contact.city}
<f:if condition="{job.company.contact.country}">
<br>{job.company.contact.country}
</f:if>
</f:then>
<f:else>
{job.company.street}<br>
<f:if condition="{job.company.state}">
{job.company.state}<br>
</f:if>
{job.company.zip} {job.company.city}
<f:if condition="{job.company.country}">
<br>{job.company.country}
</f:if>
</f:else>
</f:if>
</f:else>
</f:if>
{job.company.zip} {job.company.city}
</p>
</f:if>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment