Skip to content

Commit

Permalink
Remove vocabulary dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
metacontext committed May 1, 2020
1 parent d71b3fd commit 90331b7
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 108 deletions.
30 changes: 0 additions & 30 deletions Classes/Domain/Model/TemporalEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,6 @@ class TemporalEntity extends AbstractEntity
*/
protected $description;

/**
* LOD statements about the temporal entity
*
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Digicademy\Vocabulary\Domain\Model\Statements>
* @lazy
*/
protected $statements = null;

/**
* Returns the persistentIdentifier
*
Expand Down Expand Up @@ -306,26 +298,4 @@ public function setDescription($description)
$this->description = $description;
}

/**
* Returns the statements
*
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Digicademy\Vocabulary\Domain\Model\Statements> $statements
*/
public function getStatements()
{
return $this->statements;
}

/**
* Sets the statements
*
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Digicademy\Vocabulary\Domain\Model\Statements> $statements
*
* @return void
*/
public function setStatements($statements)
{
$this->statements = $statements;
}

}
62 changes: 3 additions & 59 deletions Configuration/TCA/tx_chftime_domain_model_temporal_entity.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
'ctrl' => array(
'title' => 'LLL:EXT:chf_time/Resources/Private/Language/locallang_db.xlf:tx_chftime_domain_model_temporal_entity',
'label' => 'name',
'sortby' => 'sorting',
'default_sortby' => 'ORDER BY name',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
Expand Down Expand Up @@ -37,8 +37,7 @@
date_range,
spatial_extent,
source,
description,
statements
description
',
),
'types' => array(
Expand All @@ -54,8 +53,7 @@
date_range,
spatial_extent,
source,
description,
statements,
description
--div--;LLL:EXT:chf_time/Resources/Private/Language/locallang_db.xlf:tx_chftime_domain_model_temporal_entity.div2,
sys_language_uid,
l10n_parent,
Expand Down Expand Up @@ -276,59 +274,5 @@
'eval' => 'trim'
),
),
'statements' => array(
'exclude' => 1,
'label' => 'LLL:EXT:chf_time/Resources/Private/Language/locallang_db.xml:tx_chftime_domain_model_temporal_entity.statements',
'config' => array(
'type' => 'group',
'internal_type' => 'db',
'allowed' => 'tx_vocabulary_domain_model_statements',
'foreign_table' => 'tx_vocabulary_domain_model_statements',
'MM' => 'tx_vocabulary_statements_records_mm',
'MM_match_fields' => array(
// ident field as workaround for possible bug in line 544 of \TYPO3\CMS\Core\Database\RelationHandler
// tablenames must be name of foreign table (statements) whereas ident is needed to distinguish between records from different tables
// otherwise relations are not kept/displayed correctly in this field
'ident' => 'tx_chftime_domain_model_temporal_entity',
'tablenames' => 'tx_vocabulary_domain_model_statements',
'fieldname' => 'statements',
),
'size' => 10,
'minitems' => 0,
'maxitems' => 9999,
'wizards' => array(
'suggest' => array(
'type' => 'suggest',
'default' => array(
'pidList' => '###PLACEHOLDER###',
),
),
'add' => Array(
'type' => 'popup',
'title' => 'Create new',
'icon' => 'actions-add',
'params' => array(
'table' => 'tx_vocabulary_domain_model_statements',
'pid' => '###PAGE_TSCONFIG_ID###',
'setValue' => 'prepend'
),
'JSopenParams' => 'height=350,width=580,status=0,menubar=0,scrollbars=1',
'module' => array(
'name' => 'wizard_add',
),
),
'edit' => Array(
'type' => 'popup',
'title' => 'LLL:EXT:vocabulary/Resources/Private/Language/locallang_db.xlf:wizard_edit',
'icon' => 'actions-open',
'JSopenParams' => 'height=550,width=900,status=0,menubar=0,scrollbars=1',
'popup_onlyOpenIfSelected' => 1,
'module' => array(
'name' => 'wizard_edit',
),
),
),
),
),
),
);
5 changes: 0 additions & 5 deletions Configuration/TSConfig/setup.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ TCEFORM {

# pages with temporal entity records
parent.PAGE_TSCONFIG_IDLIST = 1

# page for LOD statements created with new wizard
statements.PAGE_TSCONFIG_ID = 1
# pages for LOD statements suggest wizard
statements.suggest.default.pidList = 1
}

tx_chftime_domain_model_dateranges {
Expand Down
4 changes: 0 additions & 4 deletions Resources/Private/Language/de.locallang_db.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,6 @@
<source>Description</source>
<target state="translated">Beschreibung</target>
</trans-unit>
<trans-unit id="tx_chftime_domain_model_temporal_entity.statements">
<source>LOD Statements</source>
<target state="translated">LOD Statements</target>
</trans-unit>

<!-- CALENDAR -->

Expand Down
3 changes: 0 additions & 3 deletions Resources/Private/Language/locallang_db.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,6 @@
<trans-unit id="tx_chftime_domain_model_temporal_entity.description">
<source>Description</source>
</trans-unit>
<trans-unit id="tx_chftime_domain_model_temporal_entity.statements">
<source>LOD Statements</source>
</trans-unit>

<!-- CALENDAR -->

Expand Down
1 change: 0 additions & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
'depends' => array(
'typo3' => '7.6.0-8.7.99',
'chf_geo' => '',
'vocabulary' => '',
),
'conflicts' => array(),
'suggests' => array(),
Expand Down
7 changes: 1 addition & 6 deletions ext_tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,11 @@ CREATE TABLE tx_chftime_domain_model_temporal_entity (
# tx_chfgeo_domain_model_toponym (1:1)
spatial_extent int(11) unsigned DEFAULT '0',

# tx_vocabulary_domain_model_statements (m:n)
statements int(11) unsigned DEFAULT '0',

tstamp int(11) unsigned DEFAULT '0' NOT NULL,
crdate int(11) unsigned DEFAULT '0' NOT NULL,
cruser_id int(11) DEFAULT '0' NOT NULL,
deleted tinyint(4) unsigned DEFAULT '0' NOT NULL,
hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
sorting int(11) unsigned DEFAULT '0' NOT NULL,

t3_origuid int(11) DEFAULT '0' NOT NULL,
t3ver_oid int(11) DEFAULT '0' NOT NULL,
Expand All @@ -113,8 +109,7 @@ CREATE TABLE tx_chftime_domain_model_temporal_entity (
KEY name (name),
KEY parent (parent),
KEY date_range (date_range),
KEY spatial_extent (spatial_extent),
KEY statements (statements)
KEY spatial_extent (spatial_extent)

) ENGINE=InnoDB;

Expand Down

0 comments on commit 90331b7

Please sign in to comment.