From 2525eb2aba51451c44be471c6f5e747537400bde Mon Sep 17 00:00:00 2001 From: Torsten Oppermann <torsten@sgalinski.de> Date: Wed, 10 Jan 2018 15:03:30 +0100 Subject: [PATCH] [TASK] Removing nonsense field from contact model --- Classes/Domain/Model/Contact.php | 19 ------------------- .../TCA/tx_sgjobs_domain_model_contact.php | 15 +++------------ .../TCA/tx_sgjobs_domain_model_job.php | 2 +- ext_tables.sql | 1 - 4 files changed, 4 insertions(+), 33 deletions(-) diff --git a/Classes/Domain/Model/Contact.php b/Classes/Domain/Model/Contact.php index 95041e72..e8978eff 100644 --- a/Classes/Domain/Model/Contact.php +++ b/Classes/Domain/Model/Contact.php @@ -42,11 +42,6 @@ class Contact extends AbstractEntity { */ protected $lastName = ''; - /** - * @var string $company - */ - protected $company = ''; - /** * @var string $city */ @@ -100,20 +95,6 @@ class Contact extends AbstractEntity { $this->lastName = $lastName; } - /** - * @return string - */ - public function getCompany() { - return $this->company; - } - - /** - * @param string $company - */ - public function setCompany(string $company) { - $this->company = $company; - } - /** * @return string */ diff --git a/Configuration/TCA/tx_sgjobs_domain_model_contact.php b/Configuration/TCA/tx_sgjobs_domain_model_contact.php index a8483874..66b777b4 100644 --- a/Configuration/TCA/tx_sgjobs_domain_model_contact.php +++ b/Configuration/TCA/tx_sgjobs_domain_model_contact.php @@ -8,7 +8,7 @@ return [ 'crdate' => 'crdate', 'cruser_id' => 'cruser_id', 'dividers2tabs' => TRUE, - 'searchFields' => 'first_name, last_name, company, city, zip, email, phone, hide_in_frontend', + 'searchFields' => 'first_name, last_name, city, zip, email, phone, hide_in_frontend', 'versioningWS' => 2, 'versioning_followPages' => TRUE, 'origUid' => 't3_origuid', @@ -26,12 +26,12 @@ return [ 'Resources/Public/Icons/tx_sgjobs_domain_model_contact.svg' ], 'interface' => [ - 'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, pid, first_name, last_name, company, city, zip, email, phone, hide_in_frontend', + 'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, pid, first_name, last_name, city, zip, email, phone, hide_in_frontend', ], 'types' => [ '1' => [ 'showitem' => '--palette--;;sysLanguageAndHidden, - hide_in_frontend, first_name, last_name, company, city, zip, email, phone;;;richtext[*]:rte_transform[mode=ts], + hide_in_frontend, first_name, last_name, city, zip, email, phone;;;richtext[*]:rte_transform[mode=ts], --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime', ], ], @@ -145,15 +145,6 @@ return [ 'eval' => 'trim, required' ], ], - 'company' => [ - 'exclude' => 0, - 'label' => 'LLL:EXT:sg_jobs/Resources/Private/Language/locallang_db.xlf:tx_sgjobs_domain_model_contact.company', - 'config' => [ - 'type' => 'input', - 'size' => 30, - 'eval' => 'trim, required' - ], - ], 'city' => [ 'exclude' => 0, 'label' => 'LLL:EXT:sg_jobs/Resources/Private/Language/locallang_db.xlf:tx_sgjobs_domain_model_contact.city', diff --git a/Configuration/TCA/tx_sgjobs_domain_model_job.php b/Configuration/TCA/tx_sgjobs_domain_model_job.php index 7ed86f02..41cfa9db 100644 --- a/Configuration/TCA/tx_sgjobs_domain_model_job.php +++ b/Configuration/TCA/tx_sgjobs_domain_model_job.php @@ -218,7 +218,7 @@ return [ ], 'company' => [ 'exclude' => 0, - 'label' => 'LLL:EXT:sg_jobs/Resources/Private/Language/locallang_db.xlf:tx_sgjobs_domain_model_job.location', + 'label' => 'LLL:EXT:sg_jobs/Resources/Private/Language/locallang_db.xlf:tx_sgjobs_domain_model_job.company', 'config' => [ 'type' => 'select', 'eval' => 'required', diff --git a/ext_tables.sql b/ext_tables.sql index abbe1555..fcd79cc4 100644 --- a/ext_tables.sql +++ b/ext_tables.sql @@ -100,7 +100,6 @@ CREATE TABLE tx_sgjobs_domain_model_contact ( -- Custom fields first_name varchar(255) DEFAULT '' NOT NULL, last_name varchar(255) DEFAULT '' NOT NULL, - company int(11) unsigned DEFAULT '0' NOT NULL, city varchar(255) DEFAULT '' NOT NULL, zip varchar(255) DEFAULT '' NOT NULL, email varchar(255) DEFAULT '' NOT NULL, -- GitLab