Skip to content

Commit

Permalink
initial Github release, TYPO3 9.5 compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
Ephraim Härer committed Sep 17, 2019
0 parents commit 816c8ff
Show file tree
Hide file tree
Showing 16 changed files with 713 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Auto detect text files and perform LF normalization
* text=auto

# Custom for Visual Studio
*.cs diff=csharp

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
79 changes: 79 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk

# =========================
# Operating System Files
# =========================

# OSX
# =========================

.DS_Store
.AppleDouble
.LSOverride

# Thumbnails
._*

# Files that might appear on external disk
.Spotlight-V100
.Trashes

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# Created by .ignore support plugin (hsz.mobi)
### Typo3 template
## TYPO3 v6.2
# Ignore several upload and file directories.
/fileadmin/user_upload/
/fileadmin/_temp_/
/fileadmin/_processed_/
/uploads/
# Ignore cache
/typo3conf/temp_CACHED*
/typo3conf/temp_fieldInfo.php
/typo3conf/deprecation_*.log
/typo3conf/ENABLE_INSTALL_TOOL
/typo3conf/realurl_autoconf.php
/FIRST_INSTALL
# Ignore system folders, you should have them symlinked.
# If not comment out the following entries.
/typo3
/typo3_src
/typo3_src-*
/Packages
/.htaccess
/index.php
# Ignore temp directory.
/typo3temp/
### Example user template template
### Example user template

# IntelliJ project files
.idea
*.iml
out
gen

*.lock
15 changes: 15 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
2019-09-17 Ephraim Härer <[email protected]>

* initial Github release
* release of version 6.8.0


2019-06-12 Ephraim Härer <[email protected]>

* updated list of countries in SQL
* release of version 6.7.1


2019-06-11 Ephraim Härer <[email protected]>

* initial release with version 6.7.0
61 changes: 61 additions & 0 deletions Classes/Domain/Model/Country.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?php

namespace SJBR\StaticInfoTables\Domain\Model;

/***************************************************************
* Copyright notice
* (c) 2011-2012 Armin Rüdiger Vieweg <[email protected]>
* (c) 2013 Stanislas Rolland <typo3(arobas)sjbr.ca>
* (c) 2015 Tomasz Krawczyk <tomasz(na)typo3.pl>
* All rights reserved
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/

/**
* The Country model
*
* @copyright Copyright belongs to the respective authors
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later
*/
class Country extends AbstractEntity
{

/**
* The Turkish short name
*
* @var string
*/
protected $shortNameTr = '';

/**
* Gets the Turkish short name.
*
* @return string
*/
public function getShortNameTr()
{
return $this->shortNameTr;
}

/**
* Sets the Turkish short name.
*
* @param string $shortNameTr
* @return void
*/
public function setShortNameTr($shortNameTr)
{
$this->shortNameTr = $shortNameTr;
}
}
1 change: 1 addition & 0 deletions Configuration/DomainModelExtension/StaticInfoTables.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Domain/Model/Country
18 changes: 18 additions & 0 deletions Configuration/TCA/Overrides/static_countries.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php
defined('TYPO3_MODE') || die();

call_user_func(function ($extKey, $table) {
$additionalFields = [
'cn_short_en' => 'cn_short_tr',
];
foreach ($additionalFields as $sourceField => $destField) {
$additionalColumns = [];
$additionalColumns[$destField] = $GLOBALS['TCA'][$table]['columns'][$sourceField];
$additionalColumns[$destField]['label'] = 'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_db.xlf:static_countries_item.' . $destField;
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns($table, $additionalColumns);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes($table, $destField, '',
'after:' . $sourceField);
// Add as search field
$GLOBALS['TCA'][$table]['ctrl']['searchFields'] .= ',' . $destField;
}
}, 'static_info_tables_tr', 'static_countries');
13 changes: 13 additions & 0 deletions Configuration/TypoScript/Extbase/setup.typoscript
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
config.tx_extbase {
persistence {
classes {
SJBR\StaticInfoTables\Domain\Model\Country {
mapping {
columns {
cn_short_tr.mapOnProperty = shortNameTr
}
}
}
}
}
}
1 change: 1 addition & 0 deletions Resources/Private/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
deny from all
30 changes: 30 additions & 0 deletions Resources/Private/Language/locallang_db.xlf
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.0">
<file source-language="en" datatype="plaintext" original="messages" date="2015-07-30T15:19:07Z"
product-name="static_info_tables_tr">
<header/>
<body>
<trans-unit id="static_territories_item.tr_name_tr" xml:space="preserve">
<source>Name (TR):</source>
</trans-unit>
<trans-unit id="static_countries_item.cn_official_name_tr" xml:space="preserve">
<source>Official name (TR):</source>
</trans-unit>
<trans-unit id="static_countries_item.cn_short_tr" xml:space="preserve">
<source>Short name (TR):</source>
</trans-unit>
<trans-unit id="static_country_zones_item.zn_name_tr" xml:space="preserve">
<source>Name (TR):</source>
</trans-unit>
<trans-unit id="static_languages_item.lg_name_tr" xml:space="preserve">
<source>Name (TR):</source>
</trans-unit>
<trans-unit id="static_currencies_item.cu_name_tr" xml:space="preserve">
<source>Name (TR):</source>
</trans-unit>
<trans-unit id="static_currencies_item.cu_sub_name_tr" xml:space="preserve">
<source>Sub name (TR):</source>
</trans-unit>
</body>
</file>
</xliff>
85 changes: 85 additions & 0 deletions Resources/Public/Icons/Extension.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 816c8ff

Please sign in to comment.