mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2024-11-10 00:56:12 +01:00

Add Tea.internalNotes and break XLIFF, PHP < 7.4, and the sniffer

This commit is contained in:
Oliver Klee 2021-08-26 12:13:47 +02:00
parent 9e7b364816
commit d1fcbb19af
5 changed files with 30 additions and 2 deletions

View file

@ -25,6 +25,8 @@ class Tea extends AbstractEntity
*/
protected string $description = '';
private string $internalNotes;
/**
* @var FileReference|null
* @phpstan-var FileReference|LazyLoadingProxy|null
@ -59,6 +61,14 @@ class Tea extends AbstractEntity
$this->description = $description;
}
public function getInternalNotes(): string {
return $this->internalNotes;
}
public function setInternalNotes(string $notes): void {
$this->internalNotes = $notes;
}
public function getImage(): ?FileReference
{
if ($this->image instanceof LazyLoadingProxy) {

View file

@ -25,7 +25,7 @@ $tca = [
'1' => [
'showitem' =>
'--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general,
title, description, image, owner,
title, description, internalNotes, image, owner,
--div--;LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_product_tea.tabs.access,
--palette--;;hidden,
--palette--;;access,',
@ -146,6 +146,16 @@ $tca = [
'eval' => 'trim',
],
],
'internalNotes' => [
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_product_tea.internalNotes',
'config' => [
'type' => 'text',
'rows' => 8,
'cols' => 40,
'max' => 2000,
'eval' => 'trim',
],
],
'image' => [
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_product_tea.image',
'config' => [

View file

@ -19,6 +19,10 @@
<source>Description</source>
<target>Beschreibung</target>
</trans-unit>
<trans-unit id="tx_tea_domain_model_product_tea.description">
<source>Internal notes</source>
<target>Interne Notizen</target>
</trans-unit>
<trans-unit id="tx_tea_domain_model_product_tea.image">
<source>Image</source>
<target>Bild</target>

View file

@ -15,6 +15,9 @@
<trans-unit id="tx_tea_domain_model_product_tea.description">
<source>Description</source>
</trans-unit>
<trans-unit id="tx_tea_domain_model_product_tea.description">
<source>Internal notes</source>
</trans-unit>
<trans-unit id="tx_tea_domain_model_product_tea.image">
<source>Image</source>
</trans-unit>

View file

@ -1,6 +1,7 @@
CREATE TABLE tx_tea_domain_model_product_tea (
title varchar(255) DEFAULT '' NOT NULL,
description varchar(2000) DEFAULT '' NOT NULL,
internalNotes varchar(2000) DEFAULT '' NOT NULL,
image int(11) unsigned DEFAULT '0' NOT NULL,
owner int(11) unsigned DEFAULT '0' NOT NULL,