Skip to content
Snippets Groups Projects
Commit 0e23cb20 authored by Johannes Kreiner's avatar Johannes Kreiner
Browse files

[TASK] Add state field to Company model

parent bf5f2f97
No related branches found
No related tags found
No related merge requests found
......@@ -57,6 +57,11 @@ class Company extends AbstractEntity {
*/
protected $street = '';
/**
* @var string $state
*/
protected $state = '';
/**
* @var string $country
*/
......@@ -91,6 +96,20 @@ class Company extends AbstractEntity {
$this->city = $city;
}
/**
* @return string
*/
public function getState() {
return $this->state;
}
/**
* @param string $state
*/
public function setState(string $state) {
$this->state = $state;
}
/**
* @return string
*/
......
......@@ -34,7 +34,7 @@ return call_user_func(
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'dividers2tabs' => TRUE,
'searchFields' => 'job_id, zip, city, country, description, name, street, contact',
'searchFields' => 'job_id, zip, city, state, country, description, name, street, contact',
'versioningWS' => 2,
'versioning_followPages' => TRUE,
'origUid' => 't3_origuid',
......@@ -51,12 +51,12 @@ return call_user_func(
'iconfile' => 'EXT:' . $extKey . '/Resources/Public/Icons/' . $table . '.svg'
],
'interface' => [
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, pid, job_id, zip, city, street name, country, description, contact',
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, pid, job_id, zip, city, street name, state, country, description, contact',
],
'types' => [
'1' => [
'showitem' => '--palette--;;sysLanguageAndHidden,
job_id, zip, city, street,name, country, description, contact;;;richtext[*]:rte_transform[mode=ts],
job_id, zip, city, street,name, state, country, description, contact;;;richtext[*]:rte_transform[mode=ts],
--div--; LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_db.xlf:tca.seo_tab,
identifying_url,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime',
......@@ -195,6 +195,15 @@ return call_user_func(
'eval' => 'trim'
],
],
'state' => [
'exclude' => TRUE,
'label' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_db.xlf:' . $table . '.state',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
],
],
'country' => [
'exclude' => TRUE,
'label' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_db.xlf:' . $table . '.country',
......
......@@ -77,6 +77,10 @@
<source><![CDATA[City]]></source>
<target><![CDATA[Stadt]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_company.state" approved="yes">
<source><![CDATA[State]]></source>
<target><![CDATA[Bundesland]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_company.country" approved="yes">
<source><![CDATA[Country]]></source>
<target><![CDATA[Land]]></target>
......
......@@ -60,6 +60,9 @@
<trans-unit id="tx_sgjobs_domain_model_company.city">
<source><![CDATA[City]]></source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_company.state">
<source><![CDATA[State]]></source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_company.country">
<source><![CDATA[Country]]></source>
</trans-unit>
......
......@@ -54,6 +54,9 @@
{job.company.name}<br>
{job.contact.firstName} {job.contact.lastName}<br>
{job.company.street}<br>
<f:if condition="{job.company.state}">
{job.company.state}<br>
</f:if>
{job.company.city}
</p>
</f:if>
......
......@@ -152,6 +152,7 @@ CREATE TABLE tx_sgjobs_domain_model_company (
zip varchar(255) DEFAULT '' NOT NULL,
name varchar(255) DEFAULT '' NOT NULL,
street varchar(255) DEFAULT '' NOT NULL,
state varchar(255) DEFAULT '' NOT NULL,
country varchar(255) DEFAULT '' NOT NULL,
description text DEFAULT '' NOT NULL,
contact int(11) unsigned DEFAULT '0' NOT NULL,
......
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