Initial commit - Typo3 11.5.41
34
typo3conf/ext/tt_address/Build/FunctionalTests.xml
Normal file
@@ -0,0 +1,34 @@
|
||||
<!--
|
||||
Functional test suites setup
|
||||
|
||||
Functional tests should extend from \TYPO3\TestingFramework\Core\Tests\FunctionalTestCase,
|
||||
take a look at this class for further documentation on how to run the suite.
|
||||
|
||||
TYPO3 CMS functional test suite also needs phpunit bootstrap code, the
|
||||
file is located next to this .xml as FunctionalTestsBootstrap.php
|
||||
-->
|
||||
<phpunit
|
||||
backupGlobals="true"
|
||||
bootstrap="../.Build/vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTestsBootstrap.php"
|
||||
colors="true"
|
||||
convertErrorsToExceptions="true"
|
||||
convertWarningsToExceptions="true"
|
||||
forceCoversAnnotation="false"
|
||||
stopOnError="false"
|
||||
stopOnFailure="false"
|
||||
stopOnIncomplete="false"
|
||||
stopOnSkipped="false"
|
||||
verbose="false"
|
||||
beStrictAboutTestsThatDoNotTestAnything="false"
|
||||
>
|
||||
<testsuites>
|
||||
<testsuite name="Core tests">
|
||||
<directory>../Tests/Functional/</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<filter>
|
||||
<whitelist>
|
||||
<directory>../Classes/</directory>
|
||||
</whitelist>
|
||||
</filter>
|
||||
</phpunit>
|
||||
34
typo3conf/ext/tt_address/Build/Local/FunctionalTests.xml
Normal file
@@ -0,0 +1,34 @@
|
||||
<!--
|
||||
Functional test suites setup
|
||||
|
||||
Functional tests should extend from \TYPO3\TestingFramework\Core\Tests\FunctionalTestCase,
|
||||
take a look at this class for further documentation on how to run the suite.
|
||||
|
||||
TYPO3 CMS functional test suite also needs phpunit bootstrap code, the
|
||||
file is located next to this .xml as FunctionalTestsBootstrap.php
|
||||
-->
|
||||
<phpunit
|
||||
backupGlobals="true"
|
||||
bootstrap="../../../../../vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTestsBootstrap.php"
|
||||
colors="true"
|
||||
convertErrorsToExceptions="true"
|
||||
convertWarningsToExceptions="true"
|
||||
forceCoversAnnotation="false"
|
||||
stopOnError="false"
|
||||
stopOnFailure="false"
|
||||
stopOnIncomplete="false"
|
||||
stopOnSkipped="false"
|
||||
verbose="false"
|
||||
beStrictAboutTestsThatDoNotTestAnything="false"
|
||||
>
|
||||
<testsuites>
|
||||
<testsuite name="Core tests">
|
||||
<directory>../../Tests/Functional/</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<filter>
|
||||
<whitelist>
|
||||
<directory>../../Classes/</directory>
|
||||
</whitelist>
|
||||
</filter>
|
||||
</phpunit>
|
||||
27
typo3conf/ext/tt_address/Build/Local/phpunit.xml
Normal file
@@ -0,0 +1,27 @@
|
||||
<phpunit
|
||||
backupGlobals="true"
|
||||
bootstrap="../../../../../../vendor/typo3/testing-framework/Resources/Core/Build/UnitTestsBootstrap.php"
|
||||
colors="true"
|
||||
convertErrorsToExceptions="true"
|
||||
convertWarningsToExceptions="true"
|
||||
forceCoversAnnotation="false"
|
||||
processIsolation="false"
|
||||
stopOnError="false"
|
||||
stopOnFailure="false"
|
||||
stopOnIncomplete="false"
|
||||
stopOnSkipped="false"
|
||||
verbose="false"
|
||||
convertDeprecationsToExceptions="false"
|
||||
beStrictAboutTestsThatDoNotTestAnything="false"
|
||||
>
|
||||
<testsuites>
|
||||
<testsuite name="Core tests">
|
||||
<directory>../../Tests/Unit/</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<filter>
|
||||
<whitelist>
|
||||
<directory>../../Classes/</directory>
|
||||
</whitelist>
|
||||
</filter>
|
||||
</phpunit>
|
||||
28
typo3conf/ext/tt_address/Build/UnitTests.xml
Normal file
@@ -0,0 +1,28 @@
|
||||
<phpunit
|
||||
backupGlobals="true"
|
||||
bootstrap="../.Build/vendor/typo3/testing-framework/Resources/Core/Build/UnitTestsBootstrap.php"
|
||||
colors="true"
|
||||
convertErrorsToExceptions="true"
|
||||
convertWarningsToExceptions="true"
|
||||
forceCoversAnnotation="false"
|
||||
processIsolation="false"
|
||||
stopOnError="false"
|
||||
stopOnFailure="false"
|
||||
stopOnIncomplete="false"
|
||||
stopOnSkipped="false"
|
||||
verbose="false"
|
||||
convertDeprecationsToExceptions="false"
|
||||
beStrictAboutTestsThatDoNotTestAnything="false"
|
||||
>
|
||||
<testsuites>
|
||||
<testsuite name="tests">
|
||||
<directory>../Tests/Unit/</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<filter>
|
||||
<whitelist>
|
||||
<directory>../Classes/</directory>
|
||||
</whitelist>
|
||||
</filter>
|
||||
|
||||
</phpunit>
|
||||
60
typo3conf/ext/tt_address/Classes/Command/GeocodeCommand.php
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FriendsOfTYPO3\TtAddress\Command;
|
||||
|
||||
/**
|
||||
* This file is part of the "tt_address" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*/
|
||||
use FriendsOfTYPO3\TtAddress\Service\GeocodeService;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
|
||||
/**
|
||||
* Command for geocoding coordinates
|
||||
*/
|
||||
class GeocodeCommand extends Command
|
||||
{
|
||||
/**
|
||||
* Defines the allowed options for this command
|
||||
*
|
||||
* @inheritdoc
|
||||
*/
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setDescription('Geocode tt_address records')
|
||||
->addArgument(
|
||||
'key',
|
||||
InputArgument::REQUIRED,
|
||||
'Google Maps key for geocoding'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Geocode all records
|
||||
*
|
||||
* @inheritdoc
|
||||
* @return int
|
||||
*/
|
||||
protected function execute(InputInterface $input, OutputInterface $output): int
|
||||
{
|
||||
$this->getGeocodeService($input->getArgument('key'))->calculateCoordinatesForAllRecordsInTable();
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $key Google Maps key
|
||||
* @return GeocodeService
|
||||
*/
|
||||
protected function getGeocodeService(string $key)
|
||||
{
|
||||
return GeneralUtility::makeInstance(GeocodeService::class, $key);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,295 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FriendsOfTYPO3\TtAddress\Controller;
|
||||
|
||||
/**
|
||||
* This file is part of the "tt_address" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use FriendsOfTYPO3\TtAddress\Database\QueryGenerator;
|
||||
use FriendsOfTYPO3\TtAddress\Domain\Model\Address;
|
||||
use FriendsOfTYPO3\TtAddress\Domain\Model\Dto\Demand;
|
||||
use FriendsOfTYPO3\TtAddress\Domain\Model\Dto\Settings;
|
||||
use FriendsOfTYPO3\TtAddress\Domain\Repository\AddressRepository;
|
||||
use FriendsOfTYPO3\TtAddress\Seo\AddressTitleProvider;
|
||||
use FriendsOfTYPO3\TtAddress\Utility\CacheUtility;
|
||||
use FriendsOfTYPO3\TtAddress\Utility\TypoScript;
|
||||
use TYPO3\CMS\Core\Pagination\ArrayPaginator;
|
||||
use TYPO3\CMS\Core\Pagination\PaginatorInterface;
|
||||
use TYPO3\CMS\Core\Pagination\SimplePagination;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
|
||||
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
|
||||
use TYPO3\CMS\Extbase\Pagination\QueryResultPaginator;
|
||||
use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;
|
||||
use TYPO3\CMS\Extbase\Reflection\ObjectAccess;
|
||||
|
||||
/**
|
||||
* AddressController
|
||||
*/
|
||||
class AddressController extends ActionController
|
||||
{
|
||||
/** @var AddressRepository */
|
||||
protected $addressRepository;
|
||||
|
||||
/** @var QueryGenerator */
|
||||
protected $queryGenerator;
|
||||
|
||||
/** @var Settings */
|
||||
protected $extensionConfiguration;
|
||||
|
||||
public function initializeAction()
|
||||
{
|
||||
$this->queryGenerator = GeneralUtility::makeInstance(QueryGenerator::class);
|
||||
$this->extensionConfiguration = GeneralUtility::makeInstance(Settings::class);
|
||||
}
|
||||
|
||||
public function showAction(Address $address = null)
|
||||
{
|
||||
if (is_a($address, Address::class) && ($this->settings['detail']['checkPidOfAddressRecord'] ?? false)) {
|
||||
$address = $this->checkPidOfAddressRecord($address);
|
||||
}
|
||||
|
||||
if ($address !== null) {
|
||||
$provider = GeneralUtility::makeInstance(AddressTitleProvider::class);
|
||||
$provider->setTitle($address, (array)($this->settings['seo']['pageTitle'] ?? []));
|
||||
CacheUtility::addCacheTagsByAddressRecords([$address]);
|
||||
}
|
||||
|
||||
$this->view->assignMultiple([
|
||||
'address' => $address,
|
||||
'contentObjectData' => $this->configurationManager->getContentObject()->data,
|
||||
]);
|
||||
return $this->htmlResponse();
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists addresses by settings in waterfall principle.
|
||||
* singleRecords take precedence over categories which take precedence over records from pages
|
||||
*
|
||||
*/
|
||||
public function listAction(?array $override = [])
|
||||
{
|
||||
$contentData = $this->configurationManager->getContentObject()->data;
|
||||
$demand = $this->createDemandFromSettings();
|
||||
|
||||
if (isset($contentData['first_name'], $contentData['birthday']) && (int)($this->settings['insertRecord'] ?? 0) === 1) {
|
||||
$demand->setSingleRecords((string)$contentData['uid']);
|
||||
}
|
||||
|
||||
if (!empty($override) && $this->settings['allowOverride']) {
|
||||
$this->overrideDemand($demand, $override);
|
||||
}
|
||||
|
||||
if ($demand->getSingleRecords()) {
|
||||
$addresses = $this->addressRepository->getAddressesByCustomSorting($demand);
|
||||
} else {
|
||||
$addresses = $this->addressRepository->findByDemand($demand);
|
||||
}
|
||||
|
||||
$paginator = $this->getPaginator($addresses);
|
||||
$pagination = new SimplePagination($paginator);
|
||||
// @todo remove with version 8
|
||||
$this->view->assign('newPagination', true);
|
||||
$this->view->assign('pagination', [
|
||||
'paginator' => $paginator,
|
||||
'pagination' => $pagination,
|
||||
]);
|
||||
|
||||
$this->view->assignMultiple([
|
||||
'demand' => $demand,
|
||||
'addresses' => $addresses,
|
||||
'contentObjectData' => $contentData,
|
||||
]);
|
||||
|
||||
CacheUtility::addCacheTagsByAddressRecords(
|
||||
$addresses instanceof QueryResultInterface ? $addresses->toArray() : $addresses
|
||||
);
|
||||
return $this->htmlResponse();
|
||||
}
|
||||
|
||||
/**
|
||||
* Injects the Configuration Manager and is initializing the framework settings
|
||||
*
|
||||
* @param ConfigurationManagerInterface $configurationManager Instance of the Configuration Manager
|
||||
*/
|
||||
public function injectConfigurationManager(ConfigurationManagerInterface $configurationManager)
|
||||
{
|
||||
parent::injectConfigurationManager($configurationManager);
|
||||
$this->configurationManager = $configurationManager;
|
||||
|
||||
// get the whole typoscript (_FRAMEWORK does not work anymore, don't know why)
|
||||
$tsSettings = $this->configurationManager->getConfiguration(
|
||||
ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT,
|
||||
'',
|
||||
''
|
||||
);
|
||||
|
||||
// correct the array to be in same shape like the _SETTINGS array
|
||||
$tsSettings = $this->removeDots((array)($tsSettings['plugin.']['tx_ttaddress.'] ?? []));
|
||||
|
||||
// get original settings
|
||||
// original means: what extbase does by munching flexform and TypoScript together, but leaving empty flexform-settings empty ...
|
||||
$originalSettings = $this->configurationManager->getConfiguration(
|
||||
ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS
|
||||
);
|
||||
|
||||
$propertiesNotAllowedViaFlexForms = ['orderByAllowed'];
|
||||
foreach ($propertiesNotAllowedViaFlexForms as $property) {
|
||||
if (isset($tsSettings['settings'][$property])) {
|
||||
$originalSettings[$property] = $tsSettings['settings'][$property];
|
||||
}
|
||||
}
|
||||
|
||||
// start override
|
||||
if (isset($tsSettings['settings']['overrideFlexformSettingsIfEmpty'])) {
|
||||
$typoScriptUtility = GeneralUtility::makeInstance(TypoScript::class);
|
||||
$originalSettings = $typoScriptUtility->override($originalSettings, $tsSettings);
|
||||
}
|
||||
// Re-set global settings
|
||||
$this->settings = $originalSettings;
|
||||
}
|
||||
|
||||
protected function createDemandFromSettings(): Demand
|
||||
{
|
||||
$demand = new Demand();
|
||||
$demand->setCategories((string)($this->settings['groups'] ?? ''));
|
||||
$categoryCombination = (int)($this->settings['groupsCombination'] ?? 1) === 1 ? 'or' : 'and';
|
||||
$demand->setCategoryCombination($categoryCombination);
|
||||
$demand->setIncludeSubCategories((bool)($this->settings['includeSubcategories'] ?? false));
|
||||
|
||||
if ($this->settings['pages'] ?? false) {
|
||||
$demand->setPages($this->getPidList());
|
||||
}
|
||||
$demand->setSingleRecords((string)($this->settings['singleRecords'] ?? ''));
|
||||
$demand->setSortBy((string)($this->settings['sortBy'] ?? ''));
|
||||
$demand->setSortOrder((string)($this->settings['sortOrder'] ?? ''));
|
||||
$demand->setIgnoreWithoutCoordinates((bool)($this->settings['ignoreWithoutCoordinates'] ?? false));
|
||||
|
||||
return $demand;
|
||||
}
|
||||
|
||||
protected function overrideDemand(Demand $demand, array $override = []): Demand
|
||||
{
|
||||
$ignoredValues = ['singleRecords', 'pages'];
|
||||
$ignoredValuesLower = array_map('strtolower', $ignoredValues);
|
||||
|
||||
foreach ($ignoredValues as $property) {
|
||||
unset($override[$property]);
|
||||
}
|
||||
|
||||
// check if field exists
|
||||
if (isset($override['sortBy']) && !isset($GLOBALS['TCA']['tt_address']['columns'][$override['sortBy']])) {
|
||||
unset($override['sortBy']);
|
||||
}
|
||||
|
||||
foreach ($override as $propertyName => $propertyValue) {
|
||||
if (in_array(strtolower($propertyName), $ignoredValuesLower, true)) {
|
||||
continue;
|
||||
}
|
||||
if ($propertyValue !== '' || $this->settings['allowEmptyStringsForOverwriteDemand']) {
|
||||
ObjectAccess::setProperty($demand, $propertyName, $propertyValue);
|
||||
}
|
||||
}
|
||||
return $demand;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param AddressRepository $addressRepository
|
||||
*/
|
||||
public function injectAddressRepository(AddressRepository $addressRepository)
|
||||
{
|
||||
$this->addressRepository = $addressRepository;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes dots at the end of a configuration array
|
||||
*
|
||||
* @param array $settings the array to transformed
|
||||
* @return array $settings the transformed array
|
||||
*/
|
||||
protected function removeDots(array $settings): array
|
||||
{
|
||||
$conf = [];
|
||||
foreach ($settings as $key => $value) {
|
||||
$conf[$this->removeDotAtTheEnd($key)] = \is_array($value) ? $this->removeDots($value) : $value;
|
||||
}
|
||||
return $conf;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a dot in the end of a String
|
||||
*
|
||||
* @param string $string
|
||||
* @return string
|
||||
*/
|
||||
protected function removeDotAtTheEnd($string): string
|
||||
{
|
||||
return preg_replace('/\.$/', '', (string)$string);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves subpages of given pageIds recursively until reached $this->settings['recursive']
|
||||
*
|
||||
* @return array an array with all pageIds
|
||||
*/
|
||||
protected function getPidList(): array
|
||||
{
|
||||
$rootPIDs = explode(',', $this->settings['pages']);
|
||||
$pidList = $rootPIDs;
|
||||
|
||||
// iterate through root-page ids and merge to array
|
||||
foreach ($rootPIDs as $pid) {
|
||||
$result = $this->queryGenerator->getTreeList($pid, (int)($this->settings['recursive'] ?? 0));
|
||||
if ($result) {
|
||||
$subtreePids = explode(',', $result);
|
||||
$pidList = array_merge($pidList, $subtreePids);
|
||||
}
|
||||
}
|
||||
return $pidList;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param QueryResultInterface|array $addresses
|
||||
* @return ArrayPaginator|QueryResultPaginator
|
||||
* @throws \TYPO3\CMS\Extbase\Mvc\Exception\NoSuchArgumentException
|
||||
*/
|
||||
protected function getPaginator($addresses): PaginatorInterface
|
||||
{
|
||||
$currentPage = $this->request->hasArgument('currentPage') ? (int)$this->request->getArgument('currentPage') : 1;
|
||||
$itemsPerPage = (int)($this->settings['paginate']['itemsPerPage'] ?? 10);
|
||||
if ($itemsPerPage === 0) {
|
||||
$itemsPerPage = 10;
|
||||
}
|
||||
|
||||
if (is_array($addresses)) {
|
||||
$paginator = new ArrayPaginator($addresses, $currentPage, $itemsPerPage);
|
||||
} elseif ($addresses instanceof QueryResultInterface) {
|
||||
$paginator = new QueryResultPaginator($addresses, $currentPage, $itemsPerPage);
|
||||
} else {
|
||||
throw new \RuntimeException(sprintf('Only array and query result interface allowed for pagination, given "%s"', get_class($addresses)), 1611168593);
|
||||
}
|
||||
return $paginator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the address PID could be found in the storagePage settings of the detail plugin and
|
||||
* if the pid is not found null is returned
|
||||
*
|
||||
* @param Address $address
|
||||
* @return Address|null
|
||||
*/
|
||||
protected function checkPidOfAddressRecord(Address $address): ?Address
|
||||
{
|
||||
$allowedStoragePages = array_map('intval', $this->getPidList());
|
||||
if (count($allowedStoragePages) > 0 && !in_array($address->getPid(), $allowedStoragePages, true)) {
|
||||
$address = null;
|
||||
}
|
||||
|
||||
return $address;
|
||||
}
|
||||
}
|
||||
71
typo3conf/ext/tt_address/Classes/Database/QueryGenerator.php
Normal file
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FriendsOfTYPO3\TtAddress\Database;
|
||||
|
||||
use TYPO3\CMS\Core\Database\Connection;
|
||||
use TYPO3\CMS\Core\Database\ConnectionPool;
|
||||
use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
|
||||
/**
|
||||
* This file is part of the "tt_address" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Duplication of \TYPO3\CMS\Core\Database\QueryGenerator which has been deprecated
|
||||
*/
|
||||
class QueryGenerator
|
||||
{
|
||||
/**
|
||||
* Recursively fetch all descendants of a given page
|
||||
*
|
||||
* @param int $id uid of the page
|
||||
* @param int $depth
|
||||
* @param int $begin
|
||||
* @return string comma separated list of descendant pages
|
||||
*/
|
||||
public function getTreeList($id, $depth, $begin = 0): string
|
||||
{
|
||||
$depth = (int)$depth;
|
||||
$begin = (int)$begin;
|
||||
$id = (int)$id;
|
||||
if ($id < 0) {
|
||||
$id = abs($id);
|
||||
}
|
||||
if ($begin === 0) {
|
||||
$theList = $id;
|
||||
} else {
|
||||
$theList = '';
|
||||
}
|
||||
if ($id && $depth > 0) {
|
||||
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('pages');
|
||||
$queryBuilder->getRestrictions()->removeAll()->add(GeneralUtility::makeInstance(DeletedRestriction::class));
|
||||
$queryBuilder->select('uid')
|
||||
->from('pages')
|
||||
->where(
|
||||
$queryBuilder->expr()->eq('pid', $queryBuilder->createNamedParameter($id, Connection::PARAM_INT)),
|
||||
$queryBuilder->expr()->eq('sys_language_uid', 0)
|
||||
)
|
||||
->orderBy('uid');
|
||||
|
||||
$statement = $queryBuilder->executeQuery();
|
||||
while ($row = $statement->fetchAssociative()) {
|
||||
if ($begin <= 0) {
|
||||
$theList .= ',' . $row['uid'];
|
||||
}
|
||||
if ($depth > 1) {
|
||||
$theSubList = $this->getTreeList($row['uid'], $depth - 1, $begin - 1);
|
||||
if (!empty($theList) && !empty($theSubList) && ($theSubList[0] !== ',')) {
|
||||
$theList .= ',';
|
||||
}
|
||||
$theList .= $theSubList;
|
||||
}
|
||||
}
|
||||
}
|
||||
return (string)$theList;
|
||||
}
|
||||
}
|
||||
674
typo3conf/ext/tt_address/Classes/Domain/Model/Address.php
Normal file
@@ -0,0 +1,674 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FriendsOfTYPO3\TtAddress\Domain\Model;
|
||||
|
||||
/**
|
||||
* This file is part of the "tt_address" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use FriendsOfTYPO3\TtAddress\Utility\PropertyModification;
|
||||
use TYPO3\CMS\Extbase\Domain\Model\Category;
|
||||
use TYPO3\CMS\Extbase\Domain\Model\FileReference;
|
||||
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
|
||||
use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
|
||||
|
||||
/**
|
||||
* The domain model of a Address
|
||||
*/
|
||||
class Address extends AbstractEntity
|
||||
{
|
||||
/**
|
||||
* Hidden
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected $hidden = false;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $gender = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $name = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $firstName = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $middleName = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $lastName = '';
|
||||
|
||||
/**
|
||||
* @var \DateTime|null
|
||||
*/
|
||||
protected $birthday;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $title = '';
|
||||
|
||||
/** @var string */
|
||||
protected $titleSuffix = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $address = '';
|
||||
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
protected $latitude = 0;
|
||||
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
protected $longitude = 0;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $building = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $room = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $phone = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $fax = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $mobile = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $www = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $slug = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $skype = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $twitter = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $facebook = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $instagram = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $tiktok = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $linkedin = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $email = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $company = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $position = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $city = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $zip = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $region = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $country = '';
|
||||
|
||||
/**
|
||||
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference>
|
||||
*/
|
||||
protected $image;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $description = '';
|
||||
|
||||
/**
|
||||
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<Category>
|
||||
*/
|
||||
protected $categories;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->image = new ObjectStorage();
|
||||
$this->categories = new ObjectStorage();
|
||||
}
|
||||
|
||||
public function setHidden($hidden): void
|
||||
{
|
||||
$this->hidden = $hidden;
|
||||
}
|
||||
|
||||
public function getHidden(): bool
|
||||
{
|
||||
return $this->hidden;
|
||||
}
|
||||
|
||||
public function setGender(string $gender): void
|
||||
{
|
||||
$this->gender = $gender;
|
||||
}
|
||||
|
||||
public function getGender(): string
|
||||
{
|
||||
return $this->gender;
|
||||
}
|
||||
|
||||
public function setName(string $name): void
|
||||
{
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
public function getName(): string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
public function setFirstName(string $firstName): void
|
||||
{
|
||||
$this->firstName = $firstName;
|
||||
}
|
||||
|
||||
public function getFirstName(): string
|
||||
{
|
||||
return $this->firstName;
|
||||
}
|
||||
|
||||
public function setMiddleName(string $middleName): void
|
||||
{
|
||||
$this->middleName = $middleName;
|
||||
}
|
||||
|
||||
public function getMiddleName(): string
|
||||
{
|
||||
return $this->middleName;
|
||||
}
|
||||
|
||||
public function setLastName(string $lastName): void
|
||||
{
|
||||
$this->lastName = $lastName;
|
||||
}
|
||||
|
||||
public function getLastName(): string
|
||||
{
|
||||
return $this->lastName;
|
||||
}
|
||||
|
||||
public function setBirthday(?\DateTime $birthday = null): void
|
||||
{
|
||||
$this->birthday = $birthday;
|
||||
}
|
||||
|
||||
public function getBirthday(): ?\DateTime
|
||||
{
|
||||
return $this->birthday;
|
||||
}
|
||||
|
||||
public function setTitle(string $title): void
|
||||
{
|
||||
$this->title = $title;
|
||||
}
|
||||
|
||||
public function getTitle(): string
|
||||
{
|
||||
return $this->title;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getTitleSuffix(): string
|
||||
{
|
||||
return $this->titleSuffix;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $titleSuffix
|
||||
*/
|
||||
public function setTitleSuffix(string $titleSuffix): void
|
||||
{
|
||||
$this->titleSuffix = $titleSuffix;
|
||||
}
|
||||
|
||||
public function setAddress(string $address): void
|
||||
{
|
||||
$this->address = $address;
|
||||
}
|
||||
|
||||
public function getAddress(): string
|
||||
{
|
||||
return $this->address;
|
||||
}
|
||||
|
||||
public function setLatitude(float $latitude): void
|
||||
{
|
||||
$this->latitude = $latitude;
|
||||
}
|
||||
|
||||
public function getLatitude(): float
|
||||
{
|
||||
return $this->latitude;
|
||||
}
|
||||
|
||||
public function setLongitude(float $longitude): void
|
||||
{
|
||||
$this->longitude = $longitude;
|
||||
}
|
||||
|
||||
public function getLongitude(): float
|
||||
{
|
||||
return $this->longitude;
|
||||
}
|
||||
|
||||
public function setBuilding(string $building): void
|
||||
{
|
||||
$this->building = $building;
|
||||
}
|
||||
|
||||
public function getBuilding(): string
|
||||
{
|
||||
return $this->building;
|
||||
}
|
||||
|
||||
public function setRoom(string $room): void
|
||||
{
|
||||
$this->room = $room;
|
||||
}
|
||||
|
||||
public function getRoom(): string
|
||||
{
|
||||
return $this->room;
|
||||
}
|
||||
|
||||
public function setPhone(string $phone): void
|
||||
{
|
||||
$this->phone = $phone;
|
||||
}
|
||||
|
||||
public function getPhone(): string
|
||||
{
|
||||
return $this->phone;
|
||||
}
|
||||
|
||||
public function getCleanedPhone(): string
|
||||
{
|
||||
return PropertyModification::getCleanedNumber($this->phone);
|
||||
}
|
||||
|
||||
public function setFax(string $fax): void
|
||||
{
|
||||
$this->fax = $fax;
|
||||
}
|
||||
|
||||
public function getFax(): string
|
||||
{
|
||||
return $this->fax;
|
||||
}
|
||||
|
||||
public function getCleanedFax(): string
|
||||
{
|
||||
return PropertyModification::getCleanedNumber($this->fax);
|
||||
}
|
||||
|
||||
public function setMobile(string $mobile): void
|
||||
{
|
||||
$this->mobile = $mobile;
|
||||
}
|
||||
|
||||
public function getMobile(): string
|
||||
{
|
||||
return $this->mobile;
|
||||
}
|
||||
|
||||
public function getCleanedMobile(): string
|
||||
{
|
||||
return PropertyModification::getCleanedNumber($this->mobile);
|
||||
}
|
||||
|
||||
public function setWww(string $www): void
|
||||
{
|
||||
$this->www = $www;
|
||||
}
|
||||
|
||||
public function getWww(): string
|
||||
{
|
||||
return $this->www;
|
||||
}
|
||||
|
||||
public function getWwwSimplified(): string
|
||||
{
|
||||
return PropertyModification::getCleanedDomain($this->www);
|
||||
}
|
||||
|
||||
public function setSlug(string $slug): void
|
||||
{
|
||||
$this->slug = $slug;
|
||||
}
|
||||
|
||||
public function getSlug(): string
|
||||
{
|
||||
return $this->slug;
|
||||
}
|
||||
|
||||
public function setSkype(string $skype): void
|
||||
{
|
||||
$this->skype = $skype;
|
||||
}
|
||||
|
||||
public function getSkype(): string
|
||||
{
|
||||
return $this->skype;
|
||||
}
|
||||
|
||||
public function setTwitter(string $twitter): void
|
||||
{
|
||||
if ($twitter[0] !== '@') {
|
||||
throw new \InvalidArgumentException('twitter name must start with @', 1357530444);
|
||||
}
|
||||
|
||||
$this->twitter = $twitter;
|
||||
}
|
||||
|
||||
public function getTwitter(): string
|
||||
{
|
||||
return $this->twitter;
|
||||
}
|
||||
|
||||
public function setFacebook(string $facebook): void
|
||||
{
|
||||
if ($facebook[0] !== '/') {
|
||||
throw new \InvalidArgumentException('Facebook name must start with /', 1357530471);
|
||||
}
|
||||
|
||||
$this->facebook = $facebook;
|
||||
}
|
||||
|
||||
public function getFacebook(): string
|
||||
{
|
||||
return $this->facebook;
|
||||
}
|
||||
|
||||
public function setInstagram(string $instagram): void
|
||||
{
|
||||
$this->instagram = $instagram;
|
||||
}
|
||||
|
||||
public function getInstagram(): string
|
||||
{
|
||||
return $this->instagram;
|
||||
}
|
||||
|
||||
public function setTiktok(string $tiktok): void
|
||||
{
|
||||
$this->tiktok = $tiktok;
|
||||
}
|
||||
|
||||
public function getTiktok(): string
|
||||
{
|
||||
return $this->tiktok;
|
||||
}
|
||||
|
||||
public function setLinkedin(string $linkedin): void
|
||||
{
|
||||
$this->linkedin = $linkedin;
|
||||
}
|
||||
|
||||
public function getLinkedin(): string
|
||||
{
|
||||
return $this->linkedin;
|
||||
}
|
||||
|
||||
public function setEmail(string $email): void
|
||||
{
|
||||
$this->email = $email;
|
||||
}
|
||||
|
||||
public function getEmail(): string
|
||||
{
|
||||
return $this->email;
|
||||
}
|
||||
|
||||
public function setCompany(string $company): void
|
||||
{
|
||||
$this->company = $company;
|
||||
}
|
||||
|
||||
public function getCompany(): string
|
||||
{
|
||||
return $this->company;
|
||||
}
|
||||
|
||||
public function setPosition(string $position): void
|
||||
{
|
||||
$this->position = $position;
|
||||
}
|
||||
|
||||
public function getPosition(): string
|
||||
{
|
||||
return $this->position;
|
||||
}
|
||||
|
||||
public function setCity(string $city): void
|
||||
{
|
||||
$this->city = $city;
|
||||
}
|
||||
|
||||
public function getCity(): string
|
||||
{
|
||||
return $this->city;
|
||||
}
|
||||
|
||||
public function setZip(string $zip): void
|
||||
{
|
||||
$this->zip = $zip;
|
||||
}
|
||||
|
||||
public function getZip(): string
|
||||
{
|
||||
return $this->zip;
|
||||
}
|
||||
|
||||
public function setRegion(string $region): void
|
||||
{
|
||||
$this->region = $region;
|
||||
}
|
||||
|
||||
public function getRegion(): string
|
||||
{
|
||||
return $this->region;
|
||||
}
|
||||
|
||||
public function setCountry(string $country): void
|
||||
{
|
||||
$this->country = $country;
|
||||
}
|
||||
|
||||
public function getCountry(): string
|
||||
{
|
||||
return $this->country;
|
||||
}
|
||||
|
||||
public function addImage(FileReference $image): void
|
||||
{
|
||||
$this->image->attach($image);
|
||||
}
|
||||
|
||||
public function removeImage(FileReference $imageToRemove): void
|
||||
{
|
||||
$this->image->detach($imageToRemove);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference>
|
||||
*/
|
||||
public function getImage(): ?ObjectStorage
|
||||
{
|
||||
return $this->image;
|
||||
}
|
||||
|
||||
public function getFirstImage(): ?FileReference
|
||||
{
|
||||
$images = $this->getImage();
|
||||
if ($images) {
|
||||
foreach ($images as $image) {
|
||||
return $image;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ObjectStorage<FileReference> $image
|
||||
*/
|
||||
public function setImage(ObjectStorage $image): void
|
||||
{
|
||||
$this->image = $image;
|
||||
}
|
||||
|
||||
public function setDescription(string $description): void
|
||||
{
|
||||
$this->description = $description;
|
||||
}
|
||||
|
||||
public function getDescription(): string
|
||||
{
|
||||
return $this->description;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ObjectStorage<Category>
|
||||
*/
|
||||
public function getCategories(): ObjectStorage
|
||||
{
|
||||
return $this->categories;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ObjectStorage<Category> $categories
|
||||
*/
|
||||
public function setCategories(ObjectStorage $categories): void
|
||||
{
|
||||
$this->categories = $categories;
|
||||
}
|
||||
|
||||
public function getSysLanguageUid(): int
|
||||
{
|
||||
return $this->_languageUid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get full name including title, first, middle and last name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getFullName(): string
|
||||
{
|
||||
$list = [
|
||||
$this->getTitle(),
|
||||
$this->getFirstName(),
|
||||
$this->getMiddleName(),
|
||||
$this->getLastName(),
|
||||
];
|
||||
|
||||
$name = implode(' ', array_filter($list));
|
||||
if ($this->titleSuffix) {
|
||||
$name .= ', ' . $this->titleSuffix;
|
||||
}
|
||||
return $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the first category
|
||||
*
|
||||
* @return \TYPO3\CMS\Extbase\Domain\Model\Category|null the first category
|
||||
*/
|
||||
public function getFirstCategory(): ?Category
|
||||
{
|
||||
$categories = $this->getCategories();
|
||||
if (!is_null($categories)) {
|
||||
$categories->rewind();
|
||||
return $categories->current();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getAddressInOneLine(): string
|
||||
{
|
||||
return implode(', ', array_filter([
|
||||
str_replace(chr(10), ',', $this->address),
|
||||
$this->city,
|
||||
$this->region,
|
||||
$this->country,
|
||||
]));
|
||||
}
|
||||
}
|
||||
165
typo3conf/ext/tt_address/Classes/Domain/Model/Dto/Demand.php
Normal file
@@ -0,0 +1,165 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FriendsOfTYPO3\TtAddress\Domain\Model\Dto;
|
||||
|
||||
/**
|
||||
* This file is part of the "tt_address" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*/
|
||||
class Demand
|
||||
{
|
||||
/** @var array */
|
||||
protected $pages = [];
|
||||
|
||||
/** @var string */
|
||||
protected $sortBy = '';
|
||||
|
||||
/** @var string */
|
||||
protected $sortOrder = '';
|
||||
|
||||
/** @var string */
|
||||
protected $categories = '';
|
||||
|
||||
/** @var bool */
|
||||
protected $includeSubCategories = false;
|
||||
|
||||
/** @var string */
|
||||
protected $categoryCombination = '';
|
||||
|
||||
/** @var string */
|
||||
protected $singleRecords = '';
|
||||
|
||||
/** @var bool */
|
||||
protected $ignoreWithoutCoordinates = false;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getPages(): array
|
||||
{
|
||||
return $this->pages;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $pages
|
||||
*/
|
||||
public function setPages(array $pages)
|
||||
{
|
||||
$this->pages = $pages;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getSortBy(): string
|
||||
{
|
||||
return $this->sortBy;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sortBy
|
||||
*/
|
||||
public function setSortBy(string $sortBy)
|
||||
{
|
||||
$this->sortBy = $sortBy;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getSortOrder(): string
|
||||
{
|
||||
return $this->sortOrder;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sortOrder
|
||||
*/
|
||||
public function setSortOrder(string $sortOrder)
|
||||
{
|
||||
$this->sortOrder = $sortOrder;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getCategories(): string
|
||||
{
|
||||
return $this->categories;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $categories
|
||||
*/
|
||||
public function setCategories(string $categories)
|
||||
{
|
||||
$this->categories = $categories;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function getIncludeSubCategories(): bool
|
||||
{
|
||||
return $this->includeSubCategories;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $includeSubCategories
|
||||
*/
|
||||
public function setIncludeSubCategories(bool $includeSubCategories)
|
||||
{
|
||||
$this->includeSubCategories = $includeSubCategories;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getCategoryCombination(): string
|
||||
{
|
||||
return $this->categoryCombination;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $categoryCombination
|
||||
*/
|
||||
public function setCategoryCombination(string $categoryCombination)
|
||||
{
|
||||
$this->categoryCombination = $categoryCombination;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getSingleRecords(): string
|
||||
{
|
||||
return $this->singleRecords;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $singleRecords
|
||||
*/
|
||||
public function setSingleRecords(string $singleRecords)
|
||||
{
|
||||
$this->singleRecords = $singleRecords;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function getIgnoreWithoutCoordinates(): bool
|
||||
{
|
||||
return $this->ignoreWithoutCoordinates;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $ignoreWithoutCoordinates
|
||||
*/
|
||||
public function setIgnoreWithoutCoordinates(bool $ignoreWithoutCoordinates)
|
||||
{
|
||||
$this->ignoreWithoutCoordinates = $ignoreWithoutCoordinates;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FriendsOfTYPO3\TtAddress\Domain\Model\Dto;
|
||||
|
||||
/**
|
||||
* This file is part of the "tt_address" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*/
|
||||
use TYPO3\CMS\Core\Configuration\ExtensionConfiguration;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
|
||||
/**
|
||||
* Class Settings
|
||||
*/
|
||||
class Settings
|
||||
{
|
||||
/** @var string */
|
||||
protected $telephoneValidationPatternForPhp = '/[^\d\+\s\-]/';
|
||||
|
||||
/** @var string */
|
||||
protected $telephoneValidationPatternForJs = '/[^\d\+\s\-]/g';
|
||||
|
||||
/** @var bool */
|
||||
protected $newPagination = false;
|
||||
|
||||
/**
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$settings = $this->getSettings();
|
||||
|
||||
if (!empty($settings)) {
|
||||
$this->newPagination = (bool)($settings['newPagination'] ?? false);
|
||||
|
||||
if ($settings['telephoneValidationPatternForPhp'] ?? '') {
|
||||
$this->telephoneValidationPatternForPhp = (string)$settings['telephoneValidationPatternForPhp'];
|
||||
}
|
||||
if ($settings['telephoneValidationPatternForJs'] ?? '') {
|
||||
$this->telephoneValidationPatternForJs = (string)$settings['telephoneValidationPatternForJs'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getTelephoneValidationPatternForPhp(): string
|
||||
{
|
||||
return $this->telephoneValidationPatternForPhp;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getTelephoneValidationPatternForJs(): string
|
||||
{
|
||||
return $this->telephoneValidationPatternForJs;
|
||||
}
|
||||
|
||||
protected function getSettings(): array
|
||||
{
|
||||
try {
|
||||
return GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('tt_address');
|
||||
} catch (\Exception $e) {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,192 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FriendsOfTYPO3\TtAddress\Domain\Repository;
|
||||
|
||||
/**
|
||||
* This file is part of the "tt_address" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*/
|
||||
use FriendsOfTYPO3\TtAddress\Domain\Model\Dto\Demand;
|
||||
use FriendsOfTYPO3\TtAddress\Service\CategoryService;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Extbase\Persistence\Exception\InvalidQueryException;
|
||||
use TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbQueryParser;
|
||||
use TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings;
|
||||
use TYPO3\CMS\Extbase\Persistence\QueryInterface;
|
||||
use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;
|
||||
use TYPO3\CMS\Extbase\Persistence\Repository;
|
||||
|
||||
/**
|
||||
* The repository for the domain model Address
|
||||
*/
|
||||
class AddressRepository extends Repository
|
||||
{
|
||||
/**
|
||||
* override the storagePid settings (do not use storagePid) of extbase
|
||||
*/
|
||||
public function initializeObject()
|
||||
{
|
||||
$this->defaultQuerySettings = GeneralUtility::makeInstance(Typo3QuerySettings::class);
|
||||
$this->defaultQuerySettings->setRespectStoragePage(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Demand $demand
|
||||
* @return QueryResultInterface
|
||||
* @throws InvalidQueryException
|
||||
*/
|
||||
public function findByDemand(Demand $demand)
|
||||
{
|
||||
$query = $this->createDemandQuery($demand);
|
||||
return $query->execute();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Demand $demand
|
||||
* @return QueryInterface
|
||||
* @throws InvalidQueryException
|
||||
*/
|
||||
protected function createDemandQuery(Demand $demand): QueryInterface
|
||||
{
|
||||
$query = $this->createQuery();
|
||||
|
||||
// sorting
|
||||
$sortBy = $demand->getSortBy();
|
||||
if ($sortBy && $sortBy !== 'singleSelection' && $sortBy !== 'default') {
|
||||
$order = strtolower($demand->getSortOrder()) === 'desc' ? QueryInterface::ORDER_DESCENDING : QueryInterface::ORDER_ASCENDING;
|
||||
$query->setOrderings([$sortBy => $order]);
|
||||
}
|
||||
|
||||
$constraints = [];
|
||||
$pages = $demand->getPages();
|
||||
if (!empty($pages)) {
|
||||
$constraints['pages'] = $query->in('pid', $pages);
|
||||
}
|
||||
$categories = $demand->getCategories();
|
||||
if ($categories) {
|
||||
$categoryConstraints = $this->createCategoryConstraint($query, $categories, $demand->getIncludeSubCategories());
|
||||
if ($demand->getCategoryCombination() === 'or') {
|
||||
$constraints['categories'] = $query->logicalOr(...$categoryConstraints);
|
||||
} else {
|
||||
$constraints['categories'] = $query->logicalAnd(...$categoryConstraints);
|
||||
}
|
||||
}
|
||||
|
||||
if ($demand->getIgnoreWithoutCoordinates()) {
|
||||
$constraints['coordinatesLat'] = $query->logicalNot(
|
||||
$query->logicalOr(
|
||||
$query->equals('latitude', null),
|
||||
$query->equals('latitude', 0.0)
|
||||
)
|
||||
);
|
||||
$constraints['coordinatesLng'] = $query->logicalNot(
|
||||
$query->logicalOr(
|
||||
$query->equals('longitude', null),
|
||||
$query->equals('longitude', 0.0)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
if (!empty($constraints)) {
|
||||
$query->matching($query->logicalAnd(...array_values($constraints)));
|
||||
}
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the database query to get the matching, see findByDemand()
|
||||
*
|
||||
* @param Demand $demand
|
||||
* @return string
|
||||
* @throws InvalidQueryException
|
||||
*/
|
||||
public function getSqlQuery(Demand $demand): string
|
||||
{
|
||||
$query = $this->createDemandQuery($demand);
|
||||
$queryParser = GeneralUtility::makeInstance(Typo3DbQueryParser::class);
|
||||
|
||||
$queryBuilder = $queryParser->convertQueryToDoctrineQueryBuilder($query);
|
||||
$queryParameters = $queryBuilder->getParameters();
|
||||
$params = [];
|
||||
foreach ($queryParameters as $key => $value) {
|
||||
// prefix array keys with ':'
|
||||
$params[':' . $key] = (\is_numeric($value)) ? $value : "'" . $value . "'"; //all non numeric values have to be quoted
|
||||
unset($params[$key]);
|
||||
}
|
||||
// replace placeholders with real values
|
||||
$query = strtr($queryBuilder->getSQL(), $params);
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Demand $demand
|
||||
* @return array|QueryResultInterface
|
||||
* @throws InvalidQueryException
|
||||
*/
|
||||
public function getAddressesByCustomSorting(Demand $demand)
|
||||
{
|
||||
$idList = GeneralUtility::intExplode(',', $demand->getSingleRecords(), true);
|
||||
$sortBy = $demand->getSortBy();
|
||||
|
||||
if ($sortBy && $sortBy !== 'default' && $sortBy !== 'singleSelection') {
|
||||
$query = $this->createQuery();
|
||||
|
||||
$order = strtolower($demand->getSortOrder()) === 'desc' ? QueryInterface::ORDER_DESCENDING : QueryInterface::ORDER_ASCENDING;
|
||||
$query->setOrderings([$sortBy => $order]);
|
||||
|
||||
$constraints = [
|
||||
$query->in('uid', $idList)
|
||||
];
|
||||
|
||||
$query->matching($query->logicalAnd(...$constraints));
|
||||
return $query->execute();
|
||||
}
|
||||
|
||||
if ($demand->getSortOrder() === 'DESC') {
|
||||
$idList = array_reverse($idList);
|
||||
}
|
||||
|
||||
$list = [];
|
||||
foreach ($idList as $id) {
|
||||
$item = $this->findByIdentifier($id);
|
||||
if ($item) {
|
||||
$list[] = $item;
|
||||
}
|
||||
}
|
||||
|
||||
return $list;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a category constraint created by
|
||||
* a given list of categories and a junction string
|
||||
*
|
||||
* @param QueryInterface $query
|
||||
* @param string $categories
|
||||
* @param bool $includeSubCategories
|
||||
* @return array
|
||||
* @throws InvalidQueryException
|
||||
*/
|
||||
protected function createCategoryConstraint(QueryInterface $query, string $categories, bool $includeSubCategories = false): array
|
||||
{
|
||||
$constraints = [];
|
||||
|
||||
if ($includeSubCategories) {
|
||||
$categoryService = GeneralUtility::makeInstance(CategoryService::class);
|
||||
$allCategories = $categoryService->getChildrenCategories($categories);
|
||||
if (!\is_array($allCategories)) {
|
||||
$allCategories = GeneralUtility::intExplode(',', $allCategories, true);
|
||||
}
|
||||
} else {
|
||||
$allCategories = GeneralUtility::intExplode(',', $categories, true);
|
||||
}
|
||||
|
||||
foreach ($allCategories as $category) {
|
||||
$constraints[] = $query->contains('categories', $category);
|
||||
}
|
||||
return $constraints;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FriendsOfTYPO3\TtAddress\Evaluation;
|
||||
|
||||
/**
|
||||
* This file is part of the "tt_address" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*/
|
||||
use FriendsOfTYPO3\TtAddress\Utility\EvalcoordinatesUtility;
|
||||
|
||||
/**
|
||||
* Class for validation/evaluation of longitude to be used in 'eval' of TCA
|
||||
* removes everything except numbers and digit-sign (dot). Fills coordinates up with zeros if too short
|
||||
*/
|
||||
class LatitudeEvaluation
|
||||
{
|
||||
/**
|
||||
* Server-side validation/evaluation on saving the record
|
||||
* Tests if latutide is between -90 and +90, fills up with zeros to mach decimal (14,12) in database
|
||||
*
|
||||
* @param string $value The field value to be evaluated
|
||||
* @return string Evaluated field value
|
||||
*/
|
||||
public function evaluateFieldValue($value)
|
||||
{
|
||||
// test if we have any latitude
|
||||
if ($value && $value !== '') {
|
||||
return EvalcoordinatesUtility::formatLatitude($value);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Server-side validation/evaluation on opening the record
|
||||
*
|
||||
* @param array $parameters Array with key 'value' containing the field value from the database
|
||||
* @return string Evaluated field value
|
||||
*/
|
||||
public function deevaluateFieldValue(array $parameters)
|
||||
{
|
||||
// test if we have any latitude
|
||||
if ($parameters['value'] && $parameters['value'] !== '') {
|
||||
$parameters['value'] = EvalcoordinatesUtility::formatLatitude($parameters['value']);
|
||||
}
|
||||
return $parameters['value'];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FriendsOfTYPO3\TtAddress\Evaluation;
|
||||
|
||||
/**
|
||||
* This file is part of the "tt_address" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*/
|
||||
use FriendsOfTYPO3\TtAddress\Utility\EvalcoordinatesUtility;
|
||||
|
||||
/**
|
||||
* Class for validation/evaluation of Longitude to be used in 'eval' of TCA
|
||||
* removes everything except numbers and digit-sign (dot). Fills coordinates up with zeros if too short
|
||||
*/
|
||||
class LongitudeEvaluation
|
||||
{
|
||||
/**
|
||||
* Server-side validation/evaluation on saving the record
|
||||
* Tests if latitude is between -90 and +90, fills up with zeros to mach decimal (14,12) in database
|
||||
*
|
||||
* @param string $value The field value to be evaluated
|
||||
* @return string Evaluated field value
|
||||
*/
|
||||
public function evaluateFieldValue($value)
|
||||
{
|
||||
// test if we have any longitude
|
||||
if ($value && $value !== '') {
|
||||
return EvalcoordinatesUtility::formatLongitude($value);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Server-side validation/evaluation on opening the record
|
||||
*
|
||||
* @param array $parameters Array with key 'value' containing the field value from the database
|
||||
* @return string Evaluated field value
|
||||
*/
|
||||
public function deevaluateFieldValue(array $parameters)
|
||||
{
|
||||
// test if we have any longitude
|
||||
if ($parameters['value'] && $parameters['value'] != '') {
|
||||
$parameters['value'] = EvalcoordinatesUtility::formatLongitude($parameters['value']);
|
||||
}
|
||||
return $parameters['value'];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FriendsOfTYPO3\TtAddress\Evaluation;
|
||||
|
||||
use FriendsOfTYPO3\TtAddress\Domain\Model\Dto\Settings;
|
||||
use TYPO3\CMS\Core\Information\Typo3Version;
|
||||
use TYPO3\CMS\Core\Page\JavaScriptModuleInstruction;
|
||||
use TYPO3\CMS\Core\Page\PageRenderer;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
|
||||
/**
|
||||
* This file is part of the "tt_address" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class for telephone number validation/evaluation to be used in 'eval' of TCA
|
||||
*/
|
||||
class TelephoneEvaluation
|
||||
{
|
||||
/** @var Settings */
|
||||
protected $extensionSettings;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->extensionSettings = GeneralUtility::makeInstance(Settings::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* JavaScript code for client side validation/evaluation
|
||||
*/
|
||||
public function returnFieldJS()
|
||||
{
|
||||
if ((new Typo3Version())->getMajorVersion() >= 12) {
|
||||
GeneralUtility::makeInstance(PageRenderer::class)->addInlineSetting(
|
||||
'TtAddress.Evaluation',
|
||||
'telephoneValidationPattern',
|
||||
$this->extensionSettings->getTelephoneValidationPatternForJs()
|
||||
);
|
||||
return JavaScriptModuleInstruction::create(
|
||||
'@friendsoftypo3/tt-address/telephone-evaluation.js',
|
||||
'TelephoneEvaluation'
|
||||
);
|
||||
}
|
||||
return '
|
||||
return value.replace(' . $this->extensionSettings->getTelephoneValidationPatternForJs() . ', "");
|
||||
';
|
||||
}
|
||||
|
||||
/**
|
||||
* Server-side validation/evaluation on saving the record
|
||||
*
|
||||
* @param string $value The field value to be evaluated
|
||||
* @return string Evaluated field value
|
||||
*/
|
||||
public function evaluateFieldValue($value)
|
||||
{
|
||||
return $this->evaluate($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Server-side validation/evaluation on opening the record
|
||||
*
|
||||
* @param array $parameters Array with key 'value' containing the field value from the database
|
||||
* @return string Evaluated field value
|
||||
*/
|
||||
public function deevaluateFieldValue(array $parameters)
|
||||
{
|
||||
return $this->evaluate($parameters['value']);
|
||||
}
|
||||
|
||||
private function evaluate(string $in)
|
||||
{
|
||||
$data = preg_replace($this->extensionSettings->getTelephoneValidationPatternForPhp(), '', $in);
|
||||
return trim($data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FriendsOfTYPO3\TtAddress\FormEngine\FieldControl;
|
||||
|
||||
/**
|
||||
* This file is part of the "tt_address" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*/
|
||||
use TYPO3\CMS\Backend\Form\AbstractNode;
|
||||
use TYPO3\CMS\Core\Information\Typo3Version;
|
||||
use TYPO3\CMS\Core\Localization\LanguageService;
|
||||
use TYPO3\CMS\Core\Page\JavaScriptModuleInstruction;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Core\Utility\StringUtility;
|
||||
|
||||
/**
|
||||
* Adds a wizard for location selection via map
|
||||
*/
|
||||
class LocationMapWizard extends AbstractNode
|
||||
{
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function render(): array
|
||||
{
|
||||
$row = $this->data['databaseRow'];
|
||||
$paramArray = $this->data['parameterArray'];
|
||||
$resultArray = $this->initializeResultArray();
|
||||
|
||||
$nameLongitude = $paramArray['itemFormElName'];
|
||||
$nameLatitude = str_replace('longitude', 'latitude', $nameLongitude);
|
||||
$nameLatitudeActive = str_replace('data', 'control[active]', $nameLatitude);
|
||||
$geoCodeUrl = $geoCodeUrlShort = '';
|
||||
$gLat = '55.6760968';
|
||||
$gLon = '12.5683371';
|
||||
|
||||
$lat = $row['latitude'] != '' ? htmlspecialchars($row['latitude']) : '';
|
||||
$lon = $row['longitude'] != '' ? htmlspecialchars($row['longitude']) : '';
|
||||
|
||||
if ($row['latitude'] || $row['longitude'] == '') {
|
||||
// remove all after first slash in address (top, floor ...)
|
||||
$address = preg_replace('/^([^\/]*).*$/', '$1', $row['address'] ?? '') . ' ';
|
||||
$address .= $row['city'] ?? '';
|
||||
// if we have at least some address part (saves geocoding calls)
|
||||
if ($address) {
|
||||
// base url
|
||||
$geoCodeUrlBase = 'https://nominatim.openstreetmap.org/search?q=';
|
||||
$geoCodeUrlAddress = $address;
|
||||
$geoCodeUrlCityOnly = ($row['city'] ?? '');
|
||||
// urlparams for nominatim which are fixed.
|
||||
$geoCodeUrlQuery = '&format=json&addressdetails=1&limit=1&polygon_svg=1';
|
||||
// replace newlines with spaces; remove multiple spaces
|
||||
$geoCodeUrl = trim(preg_replace('/\s\s+/', ' ', $geoCodeUrlBase . $geoCodeUrlAddress . $geoCodeUrlQuery));
|
||||
$geoCodeUrlShort = trim(preg_replace('/\s\s+/', ' ', $geoCodeUrlBase . $geoCodeUrlCityOnly . $geoCodeUrlQuery));
|
||||
}
|
||||
}
|
||||
|
||||
$resultArray['iconIdentifier'] = 'location-map-wizard';
|
||||
$resultArray['title'] = $this->getLanguageService()->sL('LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address.locationMapWizard');
|
||||
$resultArray['linkAttributes']['class'] = 'locationMapWizard ';
|
||||
$resultArray['linkAttributes']['data-label-title'] = $this->getLanguageService()->sL('LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address.locationMapWizard');
|
||||
$resultArray['linkAttributes']['data-label-close'] = $this->getLanguageService()->sL('LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address.locationMapWizard.close');
|
||||
$resultArray['linkAttributes']['data-label-import'] = $this->getLanguageService()->sL('LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address.locationMapWizard.import');
|
||||
$resultArray['linkAttributes']['data-lat'] = $lat;
|
||||
$resultArray['linkAttributes']['data-lon'] = $lon;
|
||||
$resultArray['linkAttributes']['data-glat'] = $gLat;
|
||||
$resultArray['linkAttributes']['data-glon'] = $gLon;
|
||||
$resultArray['linkAttributes']['data-geocodeurl'] = $geoCodeUrl;
|
||||
$resultArray['linkAttributes']['data-geocodeurlshort'] = $geoCodeUrlShort;
|
||||
$resultArray['linkAttributes']['data-namelat'] = htmlspecialchars($nameLatitude);
|
||||
$resultArray['linkAttributes']['data-namelon'] = htmlspecialchars($nameLongitude);
|
||||
$resultArray['linkAttributes']['data-namelat-active'] = htmlspecialchars($nameLatitudeActive);
|
||||
$resultArray['linkAttributes']['data-tiles'] = htmlspecialchars('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png');
|
||||
$resultArray['linkAttributes']['data-copy'] = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors';
|
||||
$resultArray['stylesheetFiles'][] = 'EXT:tt_address/Resources/Public/Contrib/leaflet-core-1.4.0.css';
|
||||
$resultArray['stylesheetFiles'][] = 'EXT:tt_address/Resources/Public/Backend/LocationMapWizard/leafletBackend.css';
|
||||
|
||||
$versionInformation = GeneralUtility::makeInstance(Typo3Version::class)->getMajorVersion();
|
||||
if ($versionInformation > 11) {
|
||||
$id = StringUtility::getUniqueId('t3js-formengine-fieldcontrol-');
|
||||
$resultArray['requireJsModules'][] = JavaScriptModuleInstruction::forRequireJS(
|
||||
'TYPO3/CMS/TtAddress/leaflet-core-1.4.0'
|
||||
)->instance($id);
|
||||
$resultArray['requireJsModules'][] = JavaScriptModuleInstruction::forRequireJS(
|
||||
'TYPO3/CMS/TtAddress/LeafletBackend'
|
||||
)->instance($id);
|
||||
} else {
|
||||
$resultArray['requireJsModules'][] = 'TYPO3/CMS/TtAddress/leaflet-core-1.4.0';
|
||||
$resultArray['requireJsModules'][] = 'TYPO3/CMS/TtAddress/LeafletBackend';
|
||||
}
|
||||
|
||||
return $resultArray;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return LanguageService
|
||||
*/
|
||||
protected function getLanguageService(): LanguageService
|
||||
{
|
||||
return $GLOBALS['LANG'];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FriendsOfTYPO3\TtAddress\FormEngine;
|
||||
|
||||
/**
|
||||
* This file is part of the "tt_address" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use Doctrine\DBAL\Connection;
|
||||
use TYPO3\CMS\Backend\Preview\StandardContentPreviewRenderer;
|
||||
use TYPO3\CMS\Backend\Utility\BackendUtility;
|
||||
use TYPO3\CMS\Backend\View\BackendLayout\Grid\GridColumnItem;
|
||||
use TYPO3\CMS\Core\Database\ConnectionPool;
|
||||
use TYPO3\CMS\Core\Database\Query\Restriction\HiddenRestriction;
|
||||
use TYPO3\CMS\Core\Service\FlexFormService;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
|
||||
/**
|
||||
* Improve the rendering of the plugin in page module
|
||||
*/
|
||||
class TtAddressPreviewRenderer extends StandardContentPreviewRenderer
|
||||
{
|
||||
protected array $recordMapping = [
|
||||
'singleRecords' => [
|
||||
'table' => 'tt_address',
|
||||
'multiValue' => true,
|
||||
],
|
||||
'pages' => [
|
||||
'table' => 'pages',
|
||||
'multiValue' => true,
|
||||
],
|
||||
'singlePid' => [
|
||||
'table' => 'pages',
|
||||
'multiValue' => false,
|
||||
],
|
||||
'groups' => [
|
||||
'table' => 'sys_category',
|
||||
'multiValue' => true,
|
||||
],
|
||||
];
|
||||
|
||||
protected function renderContentElementPreviewFromFluidTemplate(array $row, ?GridColumnItem $item = null): ?string
|
||||
{
|
||||
$row = $this->enrichRow($row);
|
||||
return parent::renderContentElementPreviewFromFluidTemplate($row, $item);
|
||||
}
|
||||
|
||||
protected function enrichRow(array $row): array
|
||||
{
|
||||
$settings = $this->getFlexFormData($row['pi_flexform'] ?? '');
|
||||
|
||||
foreach ($this->recordMapping as $fieldName => $fieldConfiguration) {
|
||||
if ($settings['settings'][$fieldName] ?? false) {
|
||||
$records = $this->getRecords($fieldConfiguration['table'], $settings['settings'][$fieldName]);
|
||||
|
||||
if ($fieldConfiguration['multiValue']) {
|
||||
$row['_computed'][$fieldName] = $records;
|
||||
} else {
|
||||
$row['_computed'][$fieldName] = $records[0] ?: [];
|
||||
}
|
||||
}
|
||||
}
|
||||
$row['_computed']['lll'] = 'LLL:EXT:tt_address/Resources/Private/Language/ff/locallang_ff.xlf:pi1_flexform.';
|
||||
return $row;
|
||||
}
|
||||
|
||||
protected function getRecords(string $table, string $idList): array
|
||||
{
|
||||
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($table);
|
||||
$queryBuilder->getRestrictions()->removeByType(HiddenRestriction::class);
|
||||
|
||||
$rows = $queryBuilder
|
||||
->select('*')
|
||||
->from($table)
|
||||
->where(
|
||||
$queryBuilder->expr()->in(
|
||||
'uid',
|
||||
$queryBuilder->createNamedParameter(GeneralUtility::intExplode(',', $idList, true), Connection::PARAM_INT_ARRAY)
|
||||
)
|
||||
)
|
||||
->executeQuery()
|
||||
->fetchAllAssociative();
|
||||
|
||||
foreach ($rows as &$row) {
|
||||
$row['_computed']['title'] = BackendUtility::getRecordTitle($table, $row);
|
||||
}
|
||||
return $rows;
|
||||
}
|
||||
|
||||
protected function getFlexFormData(string $flexforms): array
|
||||
{
|
||||
$settings = [];
|
||||
if (!empty($flexforms)) {
|
||||
$settings = GeneralUtility::makeInstance(FlexFormService::class)->convertFlexFormContentToArray($flexforms);
|
||||
}
|
||||
return $settings;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FriendsOfTYPO3\TtAddress\Hooks\Tca;
|
||||
|
||||
/**
|
||||
* This file is part of the "tt_address" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*/
|
||||
use TYPO3\CMS\Core\Localization\LanguageService;
|
||||
|
||||
/**
|
||||
* Class AddFieldsToSelector
|
||||
*/
|
||||
class AddFieldsToSelector
|
||||
{
|
||||
/** @var LanguageService */
|
||||
protected $languageService;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->languageService = $GLOBALS['LANG'];
|
||||
}
|
||||
|
||||
// TODO consolidate with list in pi1
|
||||
const sortFields = ['gender', 'name', 'first_name', 'middle_name', 'last_name', 'title', 'company', 'address', 'building', 'room', 'birthday', 'zip', 'city', 'region', 'country', 'email', 'www', 'phone', 'mobile', 'fax'];
|
||||
|
||||
/**
|
||||
* Manipulating the input array, $params, adding new selectorbox items.
|
||||
*
|
||||
* @param array $params array of select field options (reference)
|
||||
*/
|
||||
public function main(array &$params)
|
||||
{
|
||||
$selectOptions = [];
|
||||
foreach (self::sortFields as $field) {
|
||||
$label = $this->languageService->sL($GLOBALS['TCA']['tt_address']['columns'][$field]['label']);
|
||||
$label = rtrim($label, ':');
|
||||
|
||||
$selectOptions[] = [
|
||||
'field' => $field,
|
||||
'label' => $label
|
||||
];
|
||||
}
|
||||
|
||||
// add sorting by order of single selection
|
||||
$selectOptions[] = [
|
||||
'field' => 'singleSelection',
|
||||
'label' => $this->languageService->sL('LLL:EXT:tt_address/Resources/Private/Language/ff/locallang_ff.xlf:pi1_flexform.sortBy.singleSelection')
|
||||
];
|
||||
|
||||
// sort by labels
|
||||
$labels = [];
|
||||
foreach ($selectOptions as $key => $v) {
|
||||
$labels[$key] = $v['label'];
|
||||
}
|
||||
$labels = array_map('strtolower', $labels);
|
||||
array_multisort($labels, SORT_ASC, $selectOptions);
|
||||
|
||||
// add fields to <select>
|
||||
foreach ($selectOptions as $option) {
|
||||
$params['items'][] = [
|
||||
$option['label'],
|
||||
$option['field']
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
76
typo3conf/ext/tt_address/Classes/Hooks/Tca/Label.php
Normal file
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FriendsOfTYPO3\TtAddress\Hooks\Tca;
|
||||
|
||||
/**
|
||||
* This file is part of the "tt_address" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use TYPO3\CMS\Backend\Utility\BackendUtility;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
|
||||
/**
|
||||
* Dynamic label of the address record based on tsconfig
|
||||
*/
|
||||
class Label
|
||||
{
|
||||
private const FALLBACK = [
|
||||
['last_name', 'first_name'],
|
||||
['email'],
|
||||
];
|
||||
|
||||
public function getAddressLabel(array &$params): void
|
||||
{
|
||||
if (!($params['row']['pid'] ?? 0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (is_numeric($params['row']['uid'])) {
|
||||
$row = BackendUtility::getRecordWSOL('tt_address', (int) $params['row']['uid']);
|
||||
} else {
|
||||
$row = $params['row'];
|
||||
}
|
||||
|
||||
// record might be in deleting process
|
||||
if (!$row) {
|
||||
return;
|
||||
}
|
||||
|
||||
$configuration = $this->getConfiguration((int) $row['pid']);
|
||||
if (!$configuration) {
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ($configuration as $fieldList) {
|
||||
$label = [];
|
||||
foreach ($fieldList as $field) {
|
||||
if (isset($row['uid'], $row[$field]) && !empty($row[$field])) {
|
||||
$label[] = BackendUtility::getProcessedValue('tt_address', $field, $row[$field], 0, false, 0, $row['uid']);
|
||||
}
|
||||
}
|
||||
if (!empty($label)) {
|
||||
$params['title'] = implode(', ', $label);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected function getConfiguration(int $pid): array
|
||||
{
|
||||
$labelConfiguration = BackendUtility::getPagesTSconfig($pid)['tt_address.']['label'] ?? '';
|
||||
if (!$labelConfiguration) {
|
||||
return self::FALLBACK;
|
||||
}
|
||||
|
||||
$configuration = [];
|
||||
$options = GeneralUtility::trimExplode(';', $labelConfiguration, true);
|
||||
foreach ($options as $option) {
|
||||
$configuration[] = GeneralUtility::trimExplode(',', $option, true);
|
||||
}
|
||||
return $configuration;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FriendsOfTYPO3\TtAddress\Seo;
|
||||
|
||||
/**
|
||||
* This file is part of the "tt_address" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*/
|
||||
use FriendsOfTYPO3\TtAddress\Domain\Model\Address;
|
||||
use TYPO3\CMS\Core\PageTitle\AbstractPageTitleProvider;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
|
||||
/**
|
||||
* Generate page title based on properties of the address model
|
||||
*/
|
||||
class AddressTitleProvider extends AbstractPageTitleProvider
|
||||
{
|
||||
private const DEFAULT_PROPERTIES = 'firstName,middleName,lastName';
|
||||
private const DEFAULT_GLUE = '" "';
|
||||
|
||||
/**
|
||||
* @param Address $address
|
||||
* @param array $configuration
|
||||
*/
|
||||
public function setTitle(Address $address, array $configuration = []): void
|
||||
{
|
||||
$titleFields = [];
|
||||
$fields = GeneralUtility::trimExplode(',', $configuration['properties'] ?? self::DEFAULT_PROPERTIES, true);
|
||||
|
||||
foreach ($fields as $field) {
|
||||
$getter = 'get' . ucfirst($field);
|
||||
$value = $address->$getter();
|
||||
if ($value) {
|
||||
$titleFields[] = $value;
|
||||
}
|
||||
}
|
||||
if (!empty($titleFields)) {
|
||||
$glue = isset($configuration['glue']) && !empty($configuration['glue']) ? $configuration['glue'] : self::DEFAULT_GLUE;
|
||||
$glue = str_getcsv($glue, '');
|
||||
$this->title = implode($glue[0], $titleFields);
|
||||
}
|
||||
}
|
||||
}
|
||||
128
typo3conf/ext/tt_address/Classes/Service/CategoryService.php
Normal file
@@ -0,0 +1,128 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FriendsOfTYPO3\TtAddress\Service;
|
||||
|
||||
/**
|
||||
* This file is part of the "tt_address" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*/
|
||||
use TYPO3\CMS\Core\Cache\CacheManager;
|
||||
use TYPO3\CMS\Core\Cache\Frontend\FrontendInterface;
|
||||
use TYPO3\CMS\Core\Database\Connection;
|
||||
use TYPO3\CMS\Core\Database\ConnectionPool;
|
||||
use TYPO3\CMS\Core\Information\Typo3Version;
|
||||
use TYPO3\CMS\Core\TimeTracker\TimeTracker;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
|
||||
/**
|
||||
* Service for category related stuff
|
||||
*/
|
||||
class CategoryService
|
||||
{
|
||||
/** @var TimeTracker */
|
||||
protected $timeTracker;
|
||||
|
||||
/** @var FrontendInterface */
|
||||
protected $cache;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->timeTracker = GeneralUtility::makeInstance(TimeTracker::class);
|
||||
$versionInformation = GeneralUtility::makeInstance(Typo3Version::class)->getMajorVersion();
|
||||
$cacheIdentifier = $versionInformation >= 11 ? 'ttaddress_category' : 'cache_ttaddress_category';
|
||||
$this->cache = GeneralUtility::makeInstance(CacheManager::class)->getCache($cacheIdentifier);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get child categories by calling recursive function
|
||||
* and using the caching framework to save some queries
|
||||
*
|
||||
* @param string $idList list of category ids to start
|
||||
* @param int $counter
|
||||
* @return string comma separated list of category ids
|
||||
*/
|
||||
public function getChildrenCategories(string $idList, int $counter = 0)
|
||||
{
|
||||
$cacheIdentifier = sha1('children' . $idList);
|
||||
|
||||
$entry = $this->cache->get($cacheIdentifier);
|
||||
if (!$entry) {
|
||||
$entry = $this->getChildrenCategoriesRecursive($idList, $counter);
|
||||
$this->cache->set($cacheIdentifier, $entry);
|
||||
}
|
||||
|
||||
return $entry;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get child categories
|
||||
*
|
||||
* @param string $idList list of category ids to start
|
||||
* @param int $counter
|
||||
* @return string comma separated list of category ids
|
||||
*/
|
||||
protected function getChildrenCategoriesRecursive(string $idList, $counter = 0): string
|
||||
{
|
||||
$result = [];
|
||||
|
||||
// add id list to the output
|
||||
if ($counter === 0) {
|
||||
$newList = $this->getUidListFromRecords($idList);
|
||||
if ($newList) {
|
||||
$result[] = $newList;
|
||||
}
|
||||
}
|
||||
|
||||
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
|
||||
->getQueryBuilderForTable('sys_category');
|
||||
$res = $queryBuilder
|
||||
->select('uid')
|
||||
->from('sys_category')
|
||||
->where(
|
||||
$queryBuilder->expr()->in('parent', $queryBuilder->createNamedParameter(explode(',', $idList), Connection::PARAM_INT_ARRAY))
|
||||
)
|
||||
->executeQuery();
|
||||
|
||||
while ($row = $res->fetchAssociative()) {
|
||||
$counter++;
|
||||
if ($counter > 10000) {
|
||||
$this->timeTracker->setTSlogMessage('EXT:tt_address: one or more recursive categories where found');
|
||||
return implode(',', $result);
|
||||
}
|
||||
$subcategories = $this->getChildrenCategoriesRecursive((string)$row['uid'], $counter);
|
||||
$result[] = $row['uid'] . ($subcategories ? ',' . $subcategories : '');
|
||||
}
|
||||
|
||||
$result = implode(',', $result);
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch ids again from DB to avoid false positives
|
||||
*
|
||||
* @param string $idList
|
||||
* @return string
|
||||
*/
|
||||
protected function getUidListFromRecords(string $idList): string
|
||||
{
|
||||
$list = [];
|
||||
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
|
||||
->getQueryBuilderForTable('sys_category');
|
||||
$rows = $queryBuilder
|
||||
->select('uid')
|
||||
->from('sys_category')
|
||||
->where(
|
||||
$queryBuilder->expr()->in('uid', $queryBuilder->createNamedParameter(explode(',', $idList), Connection::PARAM_INT_ARRAY))
|
||||
)
|
||||
->executeQuery()
|
||||
->fetchAllAssociative();
|
||||
foreach ($rows as $row) {
|
||||
$list[] = $row['uid'];
|
||||
}
|
||||
|
||||
return implode(',', $list);
|
||||
}
|
||||
}
|
||||
184
typo3conf/ext/tt_address/Classes/Service/GeocodeService.php
Normal file
@@ -0,0 +1,184 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FriendsOfTYPO3\TtAddress\Service;
|
||||
|
||||
use TYPO3\CMS\Core\Cache\CacheManager;
|
||||
/**
|
||||
* This file is part of the "tt_address" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*/
|
||||
use TYPO3\CMS\Core\Cache\Exception\NoSuchCacheException;
|
||||
use TYPO3\CMS\Core\Cache\Frontend\FrontendInterface;
|
||||
use TYPO3\CMS\Core\Database\Connection;
|
||||
use TYPO3\CMS\Core\Database\ConnectionPool;
|
||||
use TYPO3\CMS\Core\Database\Query\QueryHelper;
|
||||
use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
|
||||
use TYPO3\CMS\Core\SingletonInterface;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
|
||||
/**
|
||||
* Service for category related stuff
|
||||
*
|
||||
* thanks to https://github.com/b13/t3ext-geocoding for inspiration
|
||||
*/
|
||||
class GeocodeService implements SingletonInterface
|
||||
{
|
||||
/** @var int */
|
||||
protected $cacheTime = 7776000;
|
||||
|
||||
/** @var string */
|
||||
protected $geocodingUrl = 'https://maps.googleapis.com/maps/api/geocode/json?language=de&sensor=false';
|
||||
|
||||
public function __construct(string $googleMapsKey = '')
|
||||
{
|
||||
$this->geocodingUrl .= '&key=' . $googleMapsKey;
|
||||
}
|
||||
|
||||
/**
|
||||
* geocodes all missing records in a DB table and then stores the values
|
||||
* in the DB record.
|
||||
*
|
||||
* only works if your DB table has the necessary fields
|
||||
* helpful when calculating a batch of addresses and save the latitude/longitude automatically
|
||||
*
|
||||
* @param string $addWhereClause
|
||||
* @return int
|
||||
*/
|
||||
public function calculateCoordinatesForAllRecordsInTable($addWhereClause = ''): int
|
||||
{
|
||||
$tableName = 'tt_address';
|
||||
$latitudeField = 'latitude';
|
||||
$longitudeField = 'longitude';
|
||||
$streetField = 'address';
|
||||
$zipField = 'zip';
|
||||
$cityField = 'city';
|
||||
$countryField = 'country';
|
||||
|
||||
// Fetch all records without latitude/longitude
|
||||
$connection = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable($tableName);
|
||||
$queryBuilder = $connection->createQueryBuilder();
|
||||
$queryBuilder->getRestrictions()
|
||||
->removeAll()
|
||||
->add(GeneralUtility::makeInstance(DeletedRestriction::class));
|
||||
$queryBuilder
|
||||
->select('*')
|
||||
->from($tableName)
|
||||
->where(
|
||||
$queryBuilder->expr()->or(
|
||||
$queryBuilder->expr()->isNull($latitudeField),
|
||||
$queryBuilder->expr()->eq($latitudeField, $queryBuilder->createNamedParameter(0, Connection::PARAM_INT)),
|
||||
$queryBuilder->expr()->eq($latitudeField, 0.00000000000),
|
||||
$queryBuilder->expr()->isNull($longitudeField),
|
||||
$queryBuilder->expr()->eq($longitudeField, $queryBuilder->createNamedParameter(0, Connection::PARAM_INT)),
|
||||
$queryBuilder->expr()->eq($longitudeField, 0.00000000000)
|
||||
)
|
||||
)
|
||||
->setMaxResults(500);
|
||||
if (!empty($addWhereClause)) {
|
||||
$queryBuilder->andWhere(QueryHelper::stripLogicalOperatorPrefix($addWhereClause));
|
||||
}
|
||||
$records = $queryBuilder->executeQuery()->fetchAllAssociative();
|
||||
if (\count($records) > 0) {
|
||||
foreach ($records as $record) {
|
||||
$country = $record[$countryField];
|
||||
|
||||
// do the geocoding
|
||||
if (!empty($record[$zipField]) || !empty($record[$cityField])) {
|
||||
$coords = $this->getCoordinatesForAddress($record[$streetField], $record[$zipField], $record[$cityField], $country);
|
||||
if ($coords) {
|
||||
// Update the record to fill in the latitude and longitude values in the DB
|
||||
$connection->update(
|
||||
$tableName,
|
||||
[
|
||||
$latitudeField => $coords['latitude'],
|
||||
$longitudeField => $coords['longitude'],
|
||||
],
|
||||
[
|
||||
'uid' => $record['uid']
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return \count($records);
|
||||
}
|
||||
|
||||
/**
|
||||
* core functionality: asks google for the coordinates of an address
|
||||
* stores known addresses in a local cache.
|
||||
*
|
||||
* @param string $street
|
||||
* @param string $zip
|
||||
* @param string $city
|
||||
* @param string $country
|
||||
* @return array an array with latitude and longitude
|
||||
*/
|
||||
public function getCoordinatesForAddress($street = null, $zip = null, $city = null, $country = ''): array
|
||||
{
|
||||
$addressParts = [];
|
||||
foreach ([$street, $zip . ' ' . $city, $country] as $addressPart) {
|
||||
if (empty($addressPart)) {
|
||||
continue;
|
||||
}
|
||||
$addressParts[] = trim($addressPart);
|
||||
}
|
||||
$address = ltrim(implode(',', $addressParts), ',');
|
||||
if (empty($address)) {
|
||||
return [];
|
||||
}
|
||||
$cacheObject = $this->initializeCache();
|
||||
$cacheKey = 'geocode-' . strtolower(str_replace(' ', '-', preg_replace('/[^0-9a-zA-Z ]/m', '', $address)));
|
||||
// Found in cache? Return it.
|
||||
if ($cacheObject->has($cacheKey)) {
|
||||
return $cacheObject->get($cacheKey);
|
||||
}
|
||||
$result = $this->getApiCallResult(
|
||||
$this->geocodingUrl . '&address=' . urlencode($address)
|
||||
);
|
||||
if (empty($result) || empty($result['results']) || empty($result['results'][0]['geometry'])) {
|
||||
return [];
|
||||
}
|
||||
$geometry = $result['results'][0]['geometry'];
|
||||
$result = [
|
||||
'latitude' => $geometry['location']['lat'],
|
||||
'longitude' => $geometry['location']['lng'],
|
||||
];
|
||||
// Now store the $result in cache and return
|
||||
$cacheObject->set($cacheKey, $result, [], $this->cacheTime);
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $url
|
||||
* @return array
|
||||
*/
|
||||
protected function getApiCallResult(string $url): array
|
||||
{
|
||||
$response = GeneralUtility::getUrl($url);
|
||||
$result = json_decode($response, true);
|
||||
if ($result['status'] !== 'OVER_QUERY_LIMIT') {
|
||||
return $result;
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the cache for the DB requests.
|
||||
*
|
||||
* @param string $name
|
||||
* @return FrontendInterface Cache Object
|
||||
*/
|
||||
protected function initializeCache(string $name = 'ttaddress_geocoding'): FrontendInterface
|
||||
{
|
||||
try {
|
||||
$cacheManager = GeneralUtility::makeInstance(CacheManager::class);
|
||||
return $cacheManager->getCache($name);
|
||||
} catch (NoSuchCacheException $e) {
|
||||
throw new \RuntimeException('Unable to load Cache!', 1548785854);
|
||||
}
|
||||
}
|
||||
}
|
||||
46
typo3conf/ext/tt_address/Classes/Utility/CacheUtility.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FriendsOfTYPO3\TtAddress\Utility;
|
||||
|
||||
/**
|
||||
* This file is part of the "tt_address" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*/
|
||||
use FriendsOfTYPO3\TtAddress\Domain\Model\Address;
|
||||
|
||||
/**
|
||||
* Class CacheUtility handles cache tags
|
||||
*/
|
||||
class CacheUtility
|
||||
{
|
||||
/**
|
||||
* Adds cache tags to page cache by tt_address-records.
|
||||
*
|
||||
* TYPO3 has a built-in mechanism which flushes the page cache
|
||||
* when editing a record. This is done by a tag that looks
|
||||
* like [table]_[record:uid]
|
||||
*
|
||||
* @param array $addressRecords array with address records
|
||||
*/
|
||||
public static function addCacheTagsByAddressRecords(array $addressRecords)
|
||||
{
|
||||
$prefix = 'tt_address_';
|
||||
$cacheTags = [];
|
||||
foreach ($addressRecords as $addressRecord) {
|
||||
if (!$addressRecord instanceof Address) {
|
||||
continue;
|
||||
}
|
||||
// cache tag for each addressRecord record
|
||||
$cacheTags[] = $prefix . $addressRecord->getUid();
|
||||
|
||||
if ($addressRecord->_getProperty('_localizedUid') != $addressRecord->getUid()) {
|
||||
$cacheTags[] = $prefix . $addressRecord->_getProperty('_localizedUid');
|
||||
}
|
||||
}
|
||||
|
||||
$GLOBALS['TSFE']->addCacheTags($cacheTags);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FriendsOfTYPO3\TtAddress\Utility;
|
||||
|
||||
/**
|
||||
* This file is part of the "tt_address" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class EvalcoordinatesUtility
|
||||
*/
|
||||
class EvalcoordinatesUtility
|
||||
{
|
||||
const LATITUDE_UPPER = '90.00000000';
|
||||
const LONGITUDE_UPPER = '180.00000000';
|
||||
|
||||
/**
|
||||
* @param string $coordinate
|
||||
* @return float evaluated and well-formed coordinate
|
||||
*/
|
||||
public static function formatLongitude(string $coordinate)
|
||||
{
|
||||
return self::validate($coordinate, self::LONGITUDE_UPPER);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $coordinate
|
||||
* @return float evaluated and well-formed coordinate
|
||||
*/
|
||||
public static function formatLatitude(string $coordinate)
|
||||
{
|
||||
return self::validate($coordinate, self::LATITUDE_UPPER);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $coordinate
|
||||
* @param string $upperRange
|
||||
* @return string
|
||||
*/
|
||||
protected static function validate($coordinate, string $upperRange): string
|
||||
{
|
||||
if ($coordinate === '') {
|
||||
return '.00000000';
|
||||
}
|
||||
|
||||
// test if value is negative
|
||||
$negative = '';
|
||||
if ($coordinate[0] === '-') {
|
||||
$negative = '-';
|
||||
}
|
||||
// remove all chars not being digits and point
|
||||
// therefore we will get a number
|
||||
$coordinate = preg_replace("/[^\d\.]/", '', $coordinate);
|
||||
|
||||
// split up string at first occurrence decimal point without losing data
|
||||
$integerPart = strstr($coordinate, '.', true);
|
||||
$decimalPart = strstr($coordinate, '.');
|
||||
|
||||
// if coordinate is given as integer (no decimal point)
|
||||
if ($integerPart === false) {
|
||||
$integerPart = $coordinate;
|
||||
}
|
||||
if ($decimalPart === false) {
|
||||
$decimalPart = '00';
|
||||
}
|
||||
|
||||
// remove all points from decimal-part
|
||||
$decimalPart = preg_replace("/[^\d]/", '', $decimalPart);
|
||||
|
||||
// fill up with zeros or shorten to match our goal of decimal(latitude: 10,8 and longitude: 11,8) in DB
|
||||
if (\strlen($decimalPart) >= 8) {
|
||||
$decimalPart = substr($decimalPart, 0, 8);
|
||||
} else {
|
||||
$decimalPart = str_pad($decimalPart, 8, '0', STR_PAD_RIGHT);
|
||||
}
|
||||
|
||||
// concatenate the whole string to a well-formed longitude and return
|
||||
$coordinate = $integerPart . '.' . $decimalPart;
|
||||
|
||||
// test if value is in the possible range. longitude can be -180 to +180.
|
||||
// latitude can be -90 to +90
|
||||
// At this point, our minus, if there, is stored to 'negative'
|
||||
// therefore we just test if integerpart is bigger than 90
|
||||
if ($coordinate > $upperRange) {
|
||||
$coordinate = $upperRange;
|
||||
}
|
||||
|
||||
// reapply signed/unsigned and return
|
||||
return $negative . $coordinate;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FriendsOfTYPO3\TtAddress\Utility;
|
||||
|
||||
/**
|
||||
* This file is part of the "tt_address" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Modify properties of the address model
|
||||
*/
|
||||
class PropertyModification
|
||||
{
|
||||
/**
|
||||
* Get cleaned number of a given telephone, fax or mobile number.
|
||||
* It removes all chars which are not possible to enter on your cell phone.
|
||||
*
|
||||
* @param string $number
|
||||
* @return string
|
||||
*/
|
||||
public static function getCleanedNumber(string $number): string
|
||||
{
|
||||
$number = trim($number);
|
||||
|
||||
// Remove 0 on +49(0)221, but keep 0 on (0)221
|
||||
if (strpos($number, '(0)') > 0) {
|
||||
$number = str_replace('(0)', '', $number);
|
||||
}
|
||||
|
||||
return preg_replace('/[^0-9#+*]/', '', $number);
|
||||
}
|
||||
|
||||
public static function getCleanedDomain(string $domain): string
|
||||
{
|
||||
$domain = trim($domain);
|
||||
if (!$domain) {
|
||||
return '';
|
||||
}
|
||||
$parts = str_replace(['\\\\', '\\"'], ['\\', '"'], str_getcsv($domain, ' '));
|
||||
return $parts[0];
|
||||
}
|
||||
}
|
||||
114
typo3conf/ext/tt_address/Classes/Utility/TypoScript.php
Normal file
@@ -0,0 +1,114 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FriendsOfTYPO3\TtAddress\Utility;
|
||||
|
||||
/**
|
||||
* This file is part of the "tt_address" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*/
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
|
||||
/**
|
||||
* TypoScript Utility class
|
||||
*/
|
||||
class TypoScript
|
||||
{
|
||||
/**
|
||||
* @param array $previousData
|
||||
* @param array $tsData
|
||||
* @return array
|
||||
*/
|
||||
public function override(array $previousData, array $tsData)
|
||||
{
|
||||
$validFields = GeneralUtility::trimExplode(',', $tsData['settings']['overrideFlexformSettingsIfEmpty'], true);
|
||||
foreach ($validFields as $fieldName) {
|
||||
// Multilevel field
|
||||
if (strpos($fieldName, '.') !== false) {
|
||||
$keyAsArray = explode('.', $fieldName);
|
||||
|
||||
$foundInCurrentTs = $this->getValue($previousData, $keyAsArray);
|
||||
|
||||
if (is_string($foundInCurrentTs) && strlen($foundInCurrentTs) === 0) {
|
||||
$foundInOriginal = $this->getValue($tsData['settings'], $keyAsArray);
|
||||
if ($foundInOriginal) {
|
||||
$previousData = $this->setValue($previousData, $keyAsArray, $foundInOriginal);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ($fieldName === 'sortBy' && (($previousData['sortBy'] ?? '') === 'default') && (($tsData['settings']['sortBy'] ?? '') !== '')) {
|
||||
unset($previousData['sortBy']);
|
||||
}
|
||||
// if flexform setting is empty and value is available in TS
|
||||
if (((!isset($previousData[$fieldName]) || (string)$previousData[$fieldName] === '') || (strlen($previousData[$fieldName]) === 0))
|
||||
&& isset($tsData['settings'][$fieldName])
|
||||
) {
|
||||
$previousData[$fieldName] = $tsData['settings'][$fieldName];
|
||||
}
|
||||
}
|
||||
}
|
||||
return $previousData;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get value from array by path
|
||||
*
|
||||
* @param array $data
|
||||
* @param array $path
|
||||
* @return array|null
|
||||
*/
|
||||
protected function getValue(array $data, array $path)
|
||||
{
|
||||
$found = true;
|
||||
|
||||
for ($x = 0; $x < count($path) && $found; $x++) {
|
||||
$key = $path[$x];
|
||||
|
||||
if (isset($data[$key])) {
|
||||
$data = $data[$key];
|
||||
} else {
|
||||
$found = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($found) {
|
||||
return $data;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set value in array by path
|
||||
*
|
||||
* @param array $array
|
||||
* @param $path
|
||||
* @param $value
|
||||
* @return array
|
||||
*/
|
||||
protected function setValue(array $array, $path, $value)
|
||||
{
|
||||
$this->setValueByReference($array, $path, $value);
|
||||
|
||||
return array_merge_recursive([], $array);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set value by reference
|
||||
*
|
||||
* @param array $array
|
||||
* @param array $path
|
||||
* @param $value
|
||||
*/
|
||||
private function setValueByReference(array &$array, array $path, $value)
|
||||
{
|
||||
while (count($path) > 1) {
|
||||
$key = array_shift($path);
|
||||
$array = &$array[$key];
|
||||
}
|
||||
|
||||
$key = reset($path);
|
||||
$array[$key] = $value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FriendsOfTYPO3\TtAddress\ViewHelpers\Clean;
|
||||
|
||||
/**
|
||||
* This file is part of the "tt_address" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use FriendsOfTYPO3\TtAddress\Utility\PropertyModification;
|
||||
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
|
||||
|
||||
class DomainViewHelper extends AbstractViewHelper
|
||||
{
|
||||
use CompileWithRenderStatic;
|
||||
|
||||
/**
|
||||
* Initialize arguments
|
||||
*/
|
||||
public function initializeArguments()
|
||||
{
|
||||
$this->registerArgument('value', 'string', 'value');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $arguments
|
||||
* @param \Closure $renderChildrenClosure
|
||||
* @param RenderingContextInterface $renderingContext
|
||||
* @return string
|
||||
*/
|
||||
public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
|
||||
{
|
||||
$value = $arguments['value'] ?: $renderChildrenClosure();
|
||||
return PropertyModification::getCleanedDomain($value);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FriendsOfTYPO3\TtAddress\ViewHelpers\Clean;
|
||||
|
||||
/**
|
||||
* This file is part of the "tt_address" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use FriendsOfTYPO3\TtAddress\Utility\PropertyModification;
|
||||
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
|
||||
|
||||
class PhoneNumberViewHelper extends AbstractViewHelper
|
||||
{
|
||||
use CompileWithRenderStatic;
|
||||
|
||||
/**
|
||||
* Initialize arguments
|
||||
*/
|
||||
public function initializeArguments()
|
||||
{
|
||||
$this->registerArgument('value', 'string', 'value');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $arguments
|
||||
* @param \Closure $renderChildrenClosure
|
||||
* @param RenderingContextInterface $renderingContext
|
||||
* @return string
|
||||
*/
|
||||
public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
|
||||
{
|
||||
$value = $arguments['value'] ?: $renderChildrenClosure();
|
||||
return PropertyModification::getCleanedNumber($value);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FriendsOfTYPO3\TtAddress\ViewHelpers;
|
||||
|
||||
/**
|
||||
* This file is part of the "tt_address" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use TYPO3\CMS\Core\MetaTag\MetaTagManagerRegistry;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
|
||||
|
||||
class MetaTagViewHelper extends AbstractViewHelper
|
||||
{
|
||||
use CompileWithRenderStatic;
|
||||
|
||||
/**
|
||||
* Initialize arguments
|
||||
*/
|
||||
public function initializeArguments()
|
||||
{
|
||||
$this->registerArgument('property', 'string', 'Property to be set', true);
|
||||
$this->registerArgument('value', 'string', 'value');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $arguments
|
||||
* @param \Closure $renderChildrenClosure
|
||||
* @param RenderingContextInterface $renderingContext
|
||||
* @return string
|
||||
*/
|
||||
public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
|
||||
{
|
||||
$value = trim($arguments['value'] ?: $renderChildrenClosure());
|
||||
if ($value) {
|
||||
$property = $arguments['property'];
|
||||
$metaTagManager = GeneralUtility::makeInstance(MetaTagManagerRegistry::class)->getManagerForProperty($property);
|
||||
$metaTagManager->addProperty($property, $value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FriendsOfTYPO3\TtAddress\ViewHelpers;
|
||||
|
||||
/**
|
||||
* This file is part of the "tt_address" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*/
|
||||
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
|
||||
|
||||
class RemoveSpacesViewHelper extends AbstractViewHelper
|
||||
{
|
||||
use CompileWithRenderStatic;
|
||||
|
||||
/**
|
||||
* Initialize arguments
|
||||
*/
|
||||
public function initializeArguments()
|
||||
{
|
||||
$this->registerArgument('value', 'string', 'value');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $arguments
|
||||
* @param \Closure $renderChildrenClosure
|
||||
* @param RenderingContextInterface $renderingContext
|
||||
* @return string
|
||||
*/
|
||||
public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
|
||||
{
|
||||
$value = $arguments['value'] ?: $renderChildrenClosure();
|
||||
return str_replace(' ', '', $value);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FriendsOfTYPO3\TtAddress\ViewHelpers;
|
||||
|
||||
/**
|
||||
* This file is part of the "tt_address" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use FriendsOfTYPO3\TtAddress\Domain\Model\Address;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
|
||||
|
||||
class StaticGoogleMapsViewHelper extends AbstractViewHelper
|
||||
{
|
||||
use CompileWithRenderStatic;
|
||||
|
||||
/**
|
||||
* Initialize arguments
|
||||
*/
|
||||
public function initializeArguments(): void
|
||||
{
|
||||
$this->registerArgument('addresses', 'mixed', 'Addresses', true);
|
||||
$this->registerArgument('parameters', 'array', 'Parameters', true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $arguments
|
||||
* @param \Closure $renderChildrenClosure
|
||||
* @param RenderingContextInterface $renderingContext
|
||||
* @return string
|
||||
*/
|
||||
public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
|
||||
{
|
||||
$mapArguments = $arguments['parameters'];
|
||||
|
||||
$markers = [];
|
||||
foreach ($arguments['addresses'] as $address) {
|
||||
/** @var Address $address */
|
||||
$markers[] = '&markers=' . $address->getLatitude() . ',' . $address->getLongitude();
|
||||
}
|
||||
if (count($markers) === 1) {
|
||||
$mapArguments['zoom'] = 13;
|
||||
}
|
||||
|
||||
return 'https://maps.googleapis.com/maps/api/staticmap?' . GeneralUtility::implodeArrayForUrl('', $mapArguments, '', true) . implode('', $markers);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use TYPO3\CMS\Core\Security\ContentSecurityPolicy\Directive;
|
||||
use TYPO3\CMS\Core\Security\ContentSecurityPolicy\Mutation;
|
||||
use TYPO3\CMS\Core\Security\ContentSecurityPolicy\MutationCollection;
|
||||
use TYPO3\CMS\Core\Security\ContentSecurityPolicy\MutationMode;
|
||||
use TYPO3\CMS\Core\Security\ContentSecurityPolicy\Scope;
|
||||
use TYPO3\CMS\Core\Security\ContentSecurityPolicy\SourceScheme;
|
||||
use TYPO3\CMS\Core\Security\ContentSecurityPolicy\UriValue;
|
||||
use TYPO3\CMS\Core\Type\Map;
|
||||
|
||||
return Map::fromEntries(
|
||||
[
|
||||
Scope::backend(),
|
||||
// NOTICE: When using `MutationMode::Set` existing declarations will be overridden
|
||||
new MutationCollection(
|
||||
// results in `default-src 'self'`
|
||||
new Mutation(MutationMode::Extend, Directive::ImgSrc, SourceScheme::data, new UriValue('https://*.openstreetmap.org')),
|
||||
new Mutation(MutationMode::Extend, Directive::ScriptSrc, SourceScheme::data, new UriValue('https://*.openstreetmap.org')),
|
||||
new Mutation(MutationMode::Extend, Directive::ConnectSrc, SourceScheme::data, new UriValue('https://*.openstreetmap.org')),
|
||||
),
|
||||
],
|
||||
[
|
||||
Scope::frontend(),
|
||||
// NOTICE: When using `MutationMode::Set` existing declarations will be overridden
|
||||
new MutationCollection(
|
||||
// results in `default-src 'self'`
|
||||
new Mutation(MutationMode::Extend, Directive::ImgSrc, SourceScheme::data, new UriValue('https://*.openstreetmap.org')),
|
||||
new Mutation(MutationMode::Extend, Directive::ScriptSrc, SourceScheme::data, new UriValue('https://*.openstreetmap.org')),
|
||||
new Mutation(MutationMode::Extend, Directive::ConnectSrc, SourceScheme::data, new UriValue('https://*.openstreetmap.org')),
|
||||
),
|
||||
]
|
||||
);
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use FriendsOfTYPO3\TtAddress\Domain\Model\Address;
|
||||
|
||||
return [
|
||||
Address::class => [
|
||||
'tableName' => 'tt_address'
|
||||
]
|
||||
];
|
||||
311
typo3conf/ext/tt_address/Configuration/FlexForms/List.xml
Normal file
@@ -0,0 +1,311 @@
|
||||
<T3DataStructure>
|
||||
<sheets>
|
||||
<sDEF>
|
||||
<ROOT>
|
||||
<TCEforms>
|
||||
<sheetTitle>
|
||||
LLL:EXT:tt_address/Resources/Private/Language/ff/locallang_ff.xlf:pi1_flexform.sheet_selection
|
||||
</sheetTitle>
|
||||
</TCEforms>
|
||||
<type>array</type>
|
||||
<el>
|
||||
<settings.singleRecords>
|
||||
<TCEforms>
|
||||
<exclude>1</exclude>
|
||||
<label>LLL:EXT:tt_address/Resources/Private/Language/ff/locallang_ff.xlf:pi1_flexform.single_records</label>
|
||||
<config>
|
||||
<type>group</type>
|
||||
<internal_type>db</internal_type>
|
||||
<allowed>tt_address</allowed>
|
||||
<size>5</size>
|
||||
<minitems>0</minitems>
|
||||
<autoSizeMax>10</autoSizeMax>
|
||||
<wizards>
|
||||
<suggest>
|
||||
<type>suggest</type>
|
||||
</suggest>
|
||||
</wizards>
|
||||
<suggestOptions>
|
||||
<default>
|
||||
<addWhere>AND tt_address.sys_language_uid IN (-1,0)</addWhere>
|
||||
</default>
|
||||
</suggestOptions>
|
||||
</config>
|
||||
</TCEforms>
|
||||
</settings.singleRecords>
|
||||
<settings.groups>
|
||||
<TCEforms>
|
||||
<exclude>1</exclude>
|
||||
<label>LLL:EXT:tt_address/Resources/Private/Language/ff/locallang_ff.xlf:pi1_flexform.group_selection</label>
|
||||
<config>
|
||||
<type>select</type>
|
||||
<renderMode>tree</renderMode>
|
||||
<renderType>selectTree</renderType>
|
||||
<treeView>1</treeView>
|
||||
<foreign_table>sys_category</foreign_table>
|
||||
<foreign_table_where>AND sys_category.sys_language_uid IN (-1, 0) ORDER BY
|
||||
sys_category.sorting ASC
|
||||
</foreign_table_where>
|
||||
<size>10</size>
|
||||
<minitems>0</minitems>
|
||||
<treeConfig>
|
||||
<parentField>parent</parentField>
|
||||
<appearance>
|
||||
<expandAll>1</expandAll>
|
||||
<showHeader>1</showHeader>
|
||||
<maxLevels>99</maxLevels>
|
||||
</appearance>
|
||||
</treeConfig>
|
||||
</config>
|
||||
</TCEforms>
|
||||
</settings.groups>
|
||||
|
||||
<settings.includeSubcategories>
|
||||
<TCEforms>
|
||||
<exclude>1</exclude>
|
||||
<label>LLL:EXT:tt_address/Resources/Private/Language/ff/locallang_ff.xlf:pi1_flexform.includeSubcategories</label>
|
||||
<config>
|
||||
<type>check</type>
|
||||
<default>0</default>
|
||||
</config>
|
||||
</TCEforms>
|
||||
</settings.includeSubcategories>
|
||||
|
||||
<settings.groupsCombination>
|
||||
<TCEforms>
|
||||
<exclude>1</exclude>
|
||||
<label>LLL:EXT:tt_address/Resources/Private/Language/ff/locallang_ff.xlf:pi1_flexform.combination</label>
|
||||
<config>
|
||||
<type>select</type>
|
||||
<renderType>selectSingle</renderType>
|
||||
<items type="array">
|
||||
<numIndex index="0" type="array">
|
||||
<numIndex index="0">
|
||||
LLL:EXT:tt_address/Resources/Private/Language/ff/locallang_ff.xlf:pi1_flexform.combination.and
|
||||
</numIndex>
|
||||
<numIndex index="1">0</numIndex>
|
||||
</numIndex>
|
||||
<numIndex index="1" type="array">
|
||||
<numIndex index="0">
|
||||
LLL:EXT:tt_address/Resources/Private/Language/ff/locallang_ff.xlf:pi1_flexform.combination.or
|
||||
</numIndex>
|
||||
<numIndex index="1">1</numIndex>
|
||||
</numIndex>
|
||||
</items>
|
||||
<default>0</default>
|
||||
</config>
|
||||
</TCEforms>
|
||||
</settings.groupsCombination>
|
||||
<settings.sortBy>
|
||||
<TCEforms>
|
||||
<exclude>1</exclude>
|
||||
<label>LLL:EXT:tt_address/Resources/Private/Language/ff/locallang_ff.xlf:pi1_flexform.sortBy</label>
|
||||
<config>
|
||||
<type>select</type>
|
||||
<renderType>selectSingle</renderType>
|
||||
<items type="array">
|
||||
<numIndex index="0" type="array">
|
||||
<numIndex index="0">LLL:EXT:tt_address/Resources/Private/Language/ff/locallang_ff.xlf:pi1_flexform.sortBy.sorting.default</numIndex>
|
||||
<numIndex index="1">default</numIndex>
|
||||
</numIndex>
|
||||
<numIndex index="1" type="array">
|
||||
<numIndex index="0">LLL:EXT:tt_address/Resources/Private/Language/ff/locallang_ff.xlf:pi1_flexform.sortBy.sorting.sorting</numIndex>
|
||||
<numIndex index="1">sorting</numIndex>
|
||||
</numIndex>
|
||||
</items>
|
||||
<itemsProcFunc>FriendsOfTYPO3\TtAddress\Hooks\Tca\AddFieldsToSelector->main
|
||||
</itemsProcFunc>
|
||||
</config>
|
||||
</TCEforms>
|
||||
</settings.sortBy>
|
||||
<settings.sortOrder>
|
||||
<TCEforms>
|
||||
<exclude>1</exclude>
|
||||
<label>LLL:EXT:tt_address/Resources/Private/Language/ff/locallang_ff.xlf:pi1_flexform.sortOrder</label>
|
||||
<config>
|
||||
<type>select</type>
|
||||
<renderType>selectSingle</renderType>
|
||||
<items type="array">
|
||||
<numIndex index="0" type="array">
|
||||
<numIndex index="0">
|
||||
LLL:EXT:tt_address/Resources/Private/Language/ff/locallang_ff.xlf:pi1_flexform.sortOrder.ascending
|
||||
</numIndex>
|
||||
<numIndex index="1">ASC</numIndex>
|
||||
</numIndex>
|
||||
<numIndex index="1" type="array">
|
||||
<numIndex index="0">
|
||||
LLL:EXT:tt_address/Resources/Private/Language/ff/locallang_ff.xlf:pi1_flexform.sortOrder.descending
|
||||
</numIndex>
|
||||
<numIndex index="1">DESC</numIndex>
|
||||
</numIndex>
|
||||
</items>
|
||||
<default>ASC</default>
|
||||
</config>
|
||||
</TCEforms>
|
||||
</settings.sortOrder>
|
||||
<settings.pages>
|
||||
<TCEforms>
|
||||
<exclude>1</exclude>
|
||||
<label>LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.startingpoint</label>
|
||||
<config>
|
||||
<type>group</type>
|
||||
<internal_type>db</internal_type>
|
||||
<allowed>pages</allowed>
|
||||
<size>3</size>
|
||||
<minitems>0</minitems>
|
||||
<wizards>
|
||||
<suggest>
|
||||
<type>suggest</type>
|
||||
</suggest>
|
||||
</wizards>
|
||||
</config>
|
||||
</TCEforms>
|
||||
</settings.pages>
|
||||
<settings.recursive>
|
||||
<TCEforms>
|
||||
<exclude>1</exclude>
|
||||
<label>LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.recursive</label>
|
||||
<config>
|
||||
<type>select</type>
|
||||
<renderType>selectSingle</renderType>
|
||||
<items type="array">
|
||||
<numIndex index="1" type="array">
|
||||
<numIndex index="0">LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:flexforms_general.recursive.I.inherit</numIndex>
|
||||
<numIndex index="1"></numIndex>
|
||||
</numIndex>
|
||||
<numIndex index="2" type="array">
|
||||
<numIndex index="0">LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:recursive.I.0</numIndex>
|
||||
<numIndex index="1">0</numIndex>
|
||||
</numIndex>
|
||||
<numIndex index="3" type="array">
|
||||
<numIndex index="0">LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:recursive.I.1</numIndex>
|
||||
<numIndex index="1">1</numIndex>
|
||||
</numIndex>
|
||||
<numIndex index="4" type="array">
|
||||
<numIndex index="0">LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:recursive.I.2</numIndex>
|
||||
<numIndex index="1">2</numIndex>
|
||||
</numIndex>
|
||||
<numIndex index="5" type="array">
|
||||
<numIndex index="0">LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:recursive.I.3</numIndex>
|
||||
<numIndex index="1">3</numIndex>
|
||||
</numIndex>
|
||||
<numIndex index="6" type="array">
|
||||
<numIndex index="0">LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:recursive.I.4</numIndex>
|
||||
<numIndex index="1">4</numIndex>
|
||||
</numIndex>
|
||||
<numIndex index="7" type="array">
|
||||
<numIndex index="0">LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:recursive.I.5</numIndex>
|
||||
<numIndex index="1">250</numIndex>
|
||||
</numIndex>
|
||||
</items>
|
||||
</config>
|
||||
</TCEforms>
|
||||
</settings.recursive>
|
||||
|
||||
<settings.ignoreWithoutCoordinates>
|
||||
<TCEforms>
|
||||
<exclude>1</exclude>
|
||||
<label>LLL:EXT:tt_address/Resources/Private/Language/ff/locallang_ff.xlf:pi1_flexform.ignoreWithoutCoordinates</label>
|
||||
<config>
|
||||
<type>check</type>
|
||||
<default>0</default>
|
||||
</config>
|
||||
</TCEforms>
|
||||
</settings.ignoreWithoutCoordinates>
|
||||
|
||||
<settings.allowOverride>
|
||||
<TCEforms>
|
||||
<exclude>1</exclude>
|
||||
<label>LLL:EXT:tt_address/Resources/Private/Language/ff/locallang_ff.xlf:pi1_flexform.allowOverride</label>
|
||||
<config>
|
||||
<type>check</type>
|
||||
<default>0</default>
|
||||
</config>
|
||||
</TCEforms>
|
||||
</settings.allowOverride>
|
||||
</el>
|
||||
</ROOT>
|
||||
</sDEF>
|
||||
|
||||
<sDISPLAY>
|
||||
<ROOT>
|
||||
<TCEforms>
|
||||
<sheetTitle>
|
||||
LLL:EXT:tt_address/Resources/Private/Language/ff/locallang_ff.xlf:pi1_flexform.sheet_display
|
||||
</sheetTitle>
|
||||
</TCEforms>
|
||||
<type>array</type>
|
||||
<el>
|
||||
<settings.displayMode>
|
||||
<TCEforms>
|
||||
<exclude>1</exclude>
|
||||
<label>LLL:EXT:tt_address/Resources/Private/Language/ff/locallang_ff.xlf:pi1_flexform.displayMode</label>
|
||||
<config>
|
||||
<type>select</type>
|
||||
<renderType>selectSingle</renderType>
|
||||
<items type="array">
|
||||
<numIndex index="0" type="array">
|
||||
<numIndex index="0">LLL:EXT:tt_address/Resources/Private/Language/ff/locallang_ff.xlf:pi1_flexform.displayMode.listView</numIndex>
|
||||
<numIndex index="1">list</numIndex>
|
||||
</numIndex>
|
||||
<numIndex index="1" type="array">
|
||||
<numIndex index="0">LLL:EXT:tt_address/Resources/Private/Language/ff/locallang_ff.xlf:pi1_flexform.displayMode.singleView</numIndex>
|
||||
<numIndex index="1">single</numIndex>
|
||||
</numIndex>
|
||||
<numIndex index="2" type="array">
|
||||
<numIndex index="0">LLL:EXT:tt_address/Resources/Private/Language/ff/locallang_ff.xlf:pi1_flexform.displayMode.map</numIndex>
|
||||
<numIndex index="1">map</numIndex>
|
||||
</numIndex>
|
||||
</items>
|
||||
</config>
|
||||
</TCEforms>
|
||||
</settings.displayMode>
|
||||
|
||||
<settings.hidePagination>
|
||||
<TCEforms>
|
||||
<exclude>1</exclude>
|
||||
<label>LLL:EXT:tt_address/Resources/Private/Language/ff/locallang_ff.xlf:pi1_flexform.hidePagination</label>
|
||||
<config>
|
||||
<type>check</type>
|
||||
</config>
|
||||
</TCEforms>
|
||||
</settings.hidePagination>
|
||||
|
||||
<settings.paginate.itemsPerPage>
|
||||
<TCEforms>
|
||||
<exclude>1</exclude>
|
||||
<label>LLL:EXT:tt_address/Resources/Private/Language/ff/locallang_ff.xlf:pi1_flexform.itemsPerPage</label>
|
||||
<config>
|
||||
<type>input</type>
|
||||
<size>5</size>
|
||||
<max>5</max>
|
||||
<eval>trim, intval</eval>
|
||||
</config>
|
||||
</TCEforms>
|
||||
</settings.paginate.itemsPerPage>
|
||||
|
||||
<settings.singlePid>
|
||||
<TCEforms>
|
||||
<exclude>1</exclude>
|
||||
<label>LLL:EXT:tt_address/Resources/Private/Language/ff/locallang_ff.xlf:pi1_flexform.singlePid</label>
|
||||
<config>
|
||||
<type>group</type>
|
||||
<internal_type>db</internal_type>
|
||||
<allowed>pages</allowed>
|
||||
<size>1</size>
|
||||
<maxitems>1</maxitems>
|
||||
<minitems>0</minitems>
|
||||
<wizards>
|
||||
<suggest>
|
||||
<type>suggest</type>
|
||||
</suggest>
|
||||
</wizards>
|
||||
</config>
|
||||
</TCEforms>
|
||||
</settings.singlePid>
|
||||
</el>
|
||||
</ROOT>
|
||||
</sDISPLAY>
|
||||
|
||||
</sheets>
|
||||
</T3DataStructure>
|
||||
16
typo3conf/ext/tt_address/Configuration/Icons.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'apps-pagetree-folder-contains-tt-address' => [
|
||||
'provider' => \TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
|
||||
'source' => 'EXT:tt_address/Resources/Public/Icons/page-tree-module.svg',
|
||||
],
|
||||
'tt-address-plugin' => [
|
||||
'provider' => \TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
|
||||
'source' => 'EXT:tt_address/Resources/Public/Icons/ContentElementWizard.svg',
|
||||
],
|
||||
'location-map-wizard' => [
|
||||
'provider' => \TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
|
||||
'source' => 'EXT:tt_address/Resources/Public/Icons/actions-geo.svg',
|
||||
],
|
||||
];
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
defined('TYPO3') or die;
|
||||
|
||||
return [
|
||||
'imports' => [
|
||||
'@friendsoftypo3/tt-address/' => 'EXT:tt_address/Resources/Public/JavaScript/esm/',
|
||||
],
|
||||
];
|
||||
17
typo3conf/ext/tt_address/Configuration/Services.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
services:
|
||||
_defaults:
|
||||
autowire: true
|
||||
autoconfigure: true
|
||||
public: false
|
||||
|
||||
FriendsOfTYPO3\TtAddress\:
|
||||
resource: '../Classes/*'
|
||||
exclude: '../Classes/Domain/Model/*'
|
||||
|
||||
FriendsOfTYPO3\TtAddress\Command\GeocodeCommand:
|
||||
tags:
|
||||
- name: 'console.command'
|
||||
command: 'ttaddress:geocode'
|
||||
description: 'Geocode tt_address records'
|
||||
schedulable: true
|
||||
hidden: false
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
defined('TYPO3_MODE') or defined('TYPO3') or die;
|
||||
|
||||
$typo3Version = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Information\Typo3Version::class)->getMajorVersion();
|
||||
|
||||
// Override news icon
|
||||
$GLOBALS['TCA']['pages']['columns']['module']['config']['items'][] = $typo3Version < 12 ? [
|
||||
0 => 'LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address',
|
||||
1 => 'tt_address',
|
||||
2 => 'apps-pagetree-folder-contains-tt-address',
|
||||
] : [
|
||||
'label' => 'LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address',
|
||||
'value' => 'tt_address',
|
||||
'icon' => 'apps-pagetree-folder-contains-tt-address',
|
||||
];
|
||||
|
||||
$GLOBALS['TCA']['pages']['ctrl']['typeicon_classes']['contains-tt-address'] = 'apps-pagetree-folder-contains-tt-address';
|
||||
$GLOBALS['TCA']['pages']['ctrl']['typeicon_classes']['contains-tt_address'] = 'apps-pagetree-folder-contains-tt-address';
|
||||
$GLOBALS['TCA']['pages']['ctrl']['typeicon_classes']['contains-ttaddress'] = 'apps-pagetree-folder-contains-tt-address';
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerPageTSConfigFile(
|
||||
'tt_address',
|
||||
'Configuration/TSconfig/AllowedNewTables.typoscript',
|
||||
'EXT:tt_address :: Restrict pages to tt_address records'
|
||||
);
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('reactions')) {
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
|
||||
'sys_reaction',
|
||||
'table_name',
|
||||
[
|
||||
'label' => 'LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address',
|
||||
'value' => 'tt_address',
|
||||
'icon' => 'EXT:tt_address/Resources/Public/Icons/tt_address.svg',
|
||||
]
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
defined('TYPO3_MODE') or defined('TYPO3') or die;
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('tt_address', 'Configuration/TypoScript/', 'Addresses (Extbase/Fluid)');
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
defined('TYPO3_MODE') or defined('TYPO3') or die;
|
||||
|
||||
call_user_func(static function () {
|
||||
// Enable language synchronisation for the category field
|
||||
$GLOBALS['TCA']['tt_address']['columns']['categories']['config']['behaviour']['allowLanguageSynchronization'] = true;
|
||||
|
||||
$versionInformation = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Information\Typo3Version::class);
|
||||
if ($versionInformation->getMajorVersion() > 11) {
|
||||
unset($GLOBALS['TCA']['tt_address']['ctrl']['cruser_id']);
|
||||
$GLOBALS['TCA']['tt_address']['columns']['birthday']['config'] = [
|
||||
'type' => 'datetime',
|
||||
];
|
||||
$GLOBALS['TCA']['tt_address']['columns']['starttime']['config'] = [
|
||||
'type' => 'datetime',
|
||||
];
|
||||
$GLOBALS['TCA']['tt_address']['columns']['endtime']['config'] = [
|
||||
'type' => 'datetime',
|
||||
];
|
||||
$GLOBALS['TCA']['tt_address']['columns']['crdate']['config'] = [
|
||||
'type' => 'datetime',
|
||||
];
|
||||
$GLOBALS['TCA']['tt_address']['columns']['tstamp']['config'] = [
|
||||
'type' => 'datetime',
|
||||
];
|
||||
$GLOBALS['TCA']['tt_address']['columns']['email']['config'] = [
|
||||
'type' => 'email',
|
||||
];
|
||||
$GLOBALS['TCA']['tt_address']['columns']['www']['config'] = [
|
||||
'type' => 'link',
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
];
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
defined('TYPO3_MODE') or defined('TYPO3') or die;
|
||||
|
||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
|
||||
'tt_address',
|
||||
'ListView',
|
||||
'LLL:EXT:tt_address/Resources/Private/Language/db/locallang.xlf:extbase_title'
|
||||
);
|
||||
|
||||
$pluginSignature = 'ttaddress_listview';
|
||||
|
||||
$GLOBALS['TCA']['tt_content']['types']['list']['previewRenderer'][$pluginSignature] = \FriendsOfTYPO3\TtAddress\FormEngine\TtAddressPreviewRenderer::class;
|
||||
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist'][$pluginSignature] = 'select_key,pages,recursive';
|
||||
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform';
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($pluginSignature, 'FILE:EXT:tt_address/Configuration/FlexForms/List.xml');
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToInsertRecords('tt_address');
|
||||
736
typo3conf/ext/tt_address/Configuration/TCA/tt_address.php
Normal file
@@ -0,0 +1,736 @@
|
||||
<?php
|
||||
$imageSettings = [
|
||||
'maxitems' => 6,
|
||||
'minitems' => 0,
|
||||
'appearance' => [
|
||||
'collapseAll' => true,
|
||||
'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference'
|
||||
],
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
'overrideChildTca' => [
|
||||
'types' => [
|
||||
'0' => [
|
||||
'showitem' => '
|
||||
--palette--;' . 'LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
|
||||
--palette--;;filePalette'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [
|
||||
'showitem' => '
|
||||
--palette--;' . 'LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
|
||||
--palette--;;filePalette'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
|
||||
'showitem' => '
|
||||
--palette--;' . 'LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
|
||||
--palette--;;filePalette'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [
|
||||
'showitem' => '
|
||||
--palette--;' . 'LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
|
||||
--palette--;;filePalette'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
|
||||
'showitem' => '
|
||||
--palette--;' . 'LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
|
||||
--palette--;;filePalette'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [
|
||||
'showitem' => '
|
||||
--palette--;' . 'LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
|
||||
--palette--;;filePalette'
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
$versionInformation = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Information\Typo3Version::class);
|
||||
if ($versionInformation->getMajorVersion() > 11) {
|
||||
$imageConfiguration = [
|
||||
'type' => 'file',
|
||||
'maxItems' => 6,
|
||||
'appearance' => $imageSettings['appearance'],
|
||||
'behaviour' => $imageSettings['behaviour'],
|
||||
'overrideChildTca' => $imageSettings['overrideChildTca'],
|
||||
'allowed' => \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], true),
|
||||
];
|
||||
} else {
|
||||
$imageConfiguration = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
|
||||
'image',
|
||||
$imageSettings,
|
||||
$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
|
||||
);
|
||||
}
|
||||
|
||||
return [
|
||||
'ctrl' => [
|
||||
'label' => 'name',
|
||||
'label_alt' => 'last_name,first_name,email,pid',
|
||||
'label_alt_force' => true,
|
||||
'label_userFunc' => \FriendsOfTYPO3\TtAddress\Hooks\Tca\Label::class . '->getAddressLabel',
|
||||
'languageField' => 'sys_language_uid',
|
||||
'transOrigPointerField' => 'l10n_parent',
|
||||
'transOrigDiffSourceField' => 'l10n_diffsource',
|
||||
'sortby' => 'sorting',
|
||||
'default_sortby' => 'ORDER BY last_name, first_name, middle_name',
|
||||
'tstamp' => 'tstamp',
|
||||
'crdate' => 'crdate',
|
||||
'cruser_id' => 'cruser_id',
|
||||
'prependAtCopy' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.prependAtCopy',
|
||||
'delete' => 'deleted',
|
||||
'title' => 'LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address',
|
||||
'versioningWS' => true,
|
||||
'origUid' => 't3_origuid',
|
||||
'thumbnail' => 'image',
|
||||
'enablecolumns' => [
|
||||
'disabled' => 'hidden',
|
||||
'starttime' => 'starttime',
|
||||
'endtime' => 'endtime',
|
||||
'fe_group' => 'fe_group',
|
||||
],
|
||||
'security' => [
|
||||
'ignorePageTypeRestriction' => true,
|
||||
],
|
||||
'iconfile' => 'EXT:tt_address/Resources/Public/Icons/tt_address.svg',
|
||||
'searchFields' => 'name, first_name, middle_name, last_name, email',
|
||||
],
|
||||
'columns' => [
|
||||
'pid' => [
|
||||
'label' => 'pid',
|
||||
'config' => [
|
||||
'type' => 'passthrough'
|
||||
]
|
||||
],
|
||||
'crdate' => [
|
||||
'label' => 'crdate',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'renderType' => 'inputDateTime',
|
||||
'eval' => 'datetime'
|
||||
]
|
||||
],
|
||||
'cruser_id' => [
|
||||
'label' => 'cruser_id',
|
||||
'config' => [
|
||||
'type' => 'passthrough'
|
||||
]
|
||||
],
|
||||
'tstamp' => [
|
||||
'label' => 'tstamp',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'renderType' => 'inputDateTime',
|
||||
'eval' => 'datetime'
|
||||
]
|
||||
],
|
||||
'hidden' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.hidden',
|
||||
'config' => [
|
||||
'type' => 'check'
|
||||
]
|
||||
],
|
||||
'starttime' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:starttime_formlabel',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'renderType' => 'inputDateTime',
|
||||
'size' => 16,
|
||||
'eval' => 'datetime,int',
|
||||
'default' => 0,
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
]
|
||||
],
|
||||
'endtime' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:endtime_formlabel',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'renderType' => 'inputDateTime',
|
||||
'size' => 16,
|
||||
'eval' => 'datetime,int',
|
||||
'default' => 0,
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
]
|
||||
],
|
||||
'fe_group' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.fe_group',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectMultipleSideBySide',
|
||||
'size' => 5,
|
||||
'maxitems' => 20,
|
||||
'items' => $versionInformation->getMajorVersion() < 12 ? [
|
||||
[
|
||||
'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.hide_at_login',
|
||||
-1,
|
||||
],
|
||||
[
|
||||
'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.any_login',
|
||||
-2,
|
||||
],
|
||||
[
|
||||
'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.usergroups',
|
||||
'--div--',
|
||||
],
|
||||
] : [
|
||||
['label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.hide_at_login', 'value' => -1],
|
||||
['label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.any_login', 'value' => -2],
|
||||
['label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.usergroups', 'value' => '--div--'],
|
||||
],
|
||||
'exclusiveKeys' => '-1,-2',
|
||||
'foreign_table' => 'fe_groups',
|
||||
'foreign_table_where' => 'ORDER BY fe_groups.title',
|
||||
],
|
||||
],
|
||||
'sys_language_uid' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||
'config' => [
|
||||
'type' => 'language',
|
||||
]
|
||||
],
|
||||
'l10n_parent' => [
|
||||
'displayCond' => 'FIELD:sys_language_uid:>:0',
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => $versionInformation->getMajorVersion() < 12 ? [
|
||||
['', 0],
|
||||
] : [
|
||||
['label' => '', 'value' => 0],
|
||||
],
|
||||
'default' => 0,
|
||||
'foreign_table' => 'tt_address',
|
||||
'foreign_table_where' => 'AND tt_address.pid=###CURRENT_PID### AND tt_address.sys_language_uid IN (-1,0)',
|
||||
]
|
||||
],
|
||||
'l10n_diffsource' => [
|
||||
'config' => [
|
||||
'type' => 'passthrough',
|
||||
'default' => ''
|
||||
]
|
||||
],
|
||||
'gender' => [
|
||||
'label' => 'LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address.gender',
|
||||
'l10n_mode' => 'exclude',
|
||||
'l10n_display' => 'defaultAsReadonly',
|
||||
'config' => [
|
||||
'type' => 'radio',
|
||||
'default' => '',
|
||||
'items' => $versionInformation->getMajorVersion() < 12 ? [
|
||||
['LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address.gender.m', 'm'],
|
||||
['LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address.gender.f', 'f'],
|
||||
['LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address.gender.v', 'v'],
|
||||
['LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address.gender.undefined', '']
|
||||
] : [
|
||||
['label' => 'LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address.gender.m', 'value' => 'm'],
|
||||
['label' => 'LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address.gender.f', 'value' => 'f'],
|
||||
['label' => 'LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address.gender.v', 'value' => 'v'],
|
||||
['label' => 'LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address.gender.undefined', 'value' => '']
|
||||
]
|
||||
]
|
||||
],
|
||||
'title' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.title_person',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 8,
|
||||
'eval' => 'trim',
|
||||
'max' => 255,
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
]
|
||||
],
|
||||
'title_suffix' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address.title_suffix',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 8,
|
||||
'eval' => 'trim',
|
||||
'max' => 255,
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
]
|
||||
],
|
||||
'slug' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:pages.slug',
|
||||
'displayCond' => 'VERSION:IS:false',
|
||||
'config' => [
|
||||
'type' => 'slug',
|
||||
'size' => 50,
|
||||
'generatorOptions' => [
|
||||
'fields' => ['first_name', 'middle_name', 'last_name'],
|
||||
'fieldSeparator' => '-',
|
||||
'replacements' => [
|
||||
'/' => '-'
|
||||
],
|
||||
],
|
||||
'fallbackCharacter' => '-',
|
||||
'eval' => 'unique',
|
||||
'default' => ''
|
||||
]
|
||||
],
|
||||
'name' => [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.name',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 40,
|
||||
'eval' => 'trim',
|
||||
'max' => 255
|
||||
]
|
||||
],
|
||||
'first_name' => [
|
||||
'exclude' => false,
|
||||
'label' => 'LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address.first_name',
|
||||
'l10n_mode' => 'exclude',
|
||||
'l10n_display' => 'defaultAsReadonly',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 20,
|
||||
'eval' => 'trim',
|
||||
'max' => 255
|
||||
]
|
||||
],
|
||||
'middle_name' => [
|
||||
'exclude' => false,
|
||||
'label' => 'LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address.middle_name',
|
||||
'l10n_mode' => 'exclude',
|
||||
'l10n_display' => 'defaultAsReadonly',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 20,
|
||||
'eval' => 'trim',
|
||||
'max' => 255
|
||||
]
|
||||
],
|
||||
'last_name' => [
|
||||
'exclude' => false,
|
||||
'label' => 'LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address.last_name',
|
||||
'l10n_mode' => 'exclude',
|
||||
'l10n_display' => 'defaultAsReadonly',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 20,
|
||||
'eval' => 'trim',
|
||||
'max' => 255
|
||||
]
|
||||
],
|
||||
'birthday' => [
|
||||
'exclude' => true,
|
||||
'l10n_display' => 'defaultAsReadonly',
|
||||
'label' => 'LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address.birthday',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'renderType' => 'inputDateTime',
|
||||
'eval' => 'date,int',
|
||||
'default' => 0
|
||||
]
|
||||
],
|
||||
'address' => [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.address',
|
||||
'config' => [
|
||||
'type' => 'text',
|
||||
'cols' => 20,
|
||||
'rows' => 3,
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
]
|
||||
],
|
||||
'building' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address.building',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'eval' => 'trim',
|
||||
'size' => 20,
|
||||
'max' => 255,
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
]
|
||||
],
|
||||
'room' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address.room',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'eval' => 'trim',
|
||||
'size' => 15,
|
||||
'max' => 255,
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
]
|
||||
],
|
||||
'phone' => [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.phone',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'eval' => \FriendsOfTYPO3\TtAddress\Evaluation\TelephoneEvaluation::class,
|
||||
'size' => 20,
|
||||
'max' => 30,
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
]
|
||||
],
|
||||
'fax' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.fax',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 20,
|
||||
'eval' => \FriendsOfTYPO3\TtAddress\Evaluation\TelephoneEvaluation::class,
|
||||
'max' => 30,
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
]
|
||||
],
|
||||
'mobile' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address.mobile',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'eval' => \FriendsOfTYPO3\TtAddress\Evaluation\TelephoneEvaluation::class,
|
||||
'size' => 20,
|
||||
'max' => 30,
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
]
|
||||
],
|
||||
'www' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.www',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'renderType' => 'inputLink',
|
||||
'fieldControl' => [
|
||||
'linkPopup' => [
|
||||
'options' => [
|
||||
'blindLinkOptions' => 'mail,file,spec,folder',
|
||||
],
|
||||
],
|
||||
],
|
||||
'eval' => 'trim',
|
||||
'size' => 20,
|
||||
'max' => 255,
|
||||
'softref' => 'typolink,url',
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
],
|
||||
],
|
||||
'email' => [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.email',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 20,
|
||||
'eval' => 'trim,email',
|
||||
'max' => 255,
|
||||
'softref' => 'email',
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
]
|
||||
],
|
||||
'skype' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address.skype',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 20,
|
||||
'eval' => 'trim',
|
||||
'max' => 255,
|
||||
'placeholder' => 'johndoe',
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
]
|
||||
],
|
||||
'twitter' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address.twitter',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 20,
|
||||
'eval' => 'trim',
|
||||
'max' => 255,
|
||||
'placeholder' => '@johndoe',
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
]
|
||||
],
|
||||
'facebook' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address.facebook',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 20,
|
||||
'eval' => 'trim',
|
||||
'max' => 255,
|
||||
'placeholder' => '/johndoe',
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
]
|
||||
],
|
||||
'instagram' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address.instagram',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 20,
|
||||
'eval' => 'trim',
|
||||
'max' => 255,
|
||||
'placeholder' => '@johndoe',
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
]
|
||||
],
|
||||
'tiktok' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address.tiktok',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 20,
|
||||
'eval' => 'trim',
|
||||
'max' => 255,
|
||||
'placeholder' => '@johndoe',
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
]
|
||||
],
|
||||
'linkedin' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address.linkedin',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 20,
|
||||
'eval' => 'trim',
|
||||
'max' => 255,
|
||||
'placeholder' => 'johndoe',
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
]
|
||||
],
|
||||
'company' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address.organization',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'eval' => 'trim',
|
||||
'size' => 20,
|
||||
'max' => 255,
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
]
|
||||
],
|
||||
'position' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address.position',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 20,
|
||||
'eval' => 'trim',
|
||||
'max' => 255,
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
]
|
||||
],
|
||||
'city' => [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.city',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 20,
|
||||
'eval' => 'trim',
|
||||
'max' => 255,
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
]
|
||||
],
|
||||
'zip' => [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.zip',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'eval' => 'trim',
|
||||
'size' => 10,
|
||||
'max' => 20,
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
]
|
||||
],
|
||||
'region' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address.region',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 10,
|
||||
'eval' => 'trim',
|
||||
'max' => 255,
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
]
|
||||
],
|
||||
'country' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.country',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 20,
|
||||
'eval' => 'trim',
|
||||
'max' => 128,
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
]
|
||||
],
|
||||
'image' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.image',
|
||||
'config' => $imageConfiguration,
|
||||
],
|
||||
'description' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.description',
|
||||
'config' => [
|
||||
'type' => 'text',
|
||||
'rows' => 5,
|
||||
'cols' => 48,
|
||||
'enableRichtext' => true,
|
||||
'richtextConfiguration' => 'default',
|
||||
'softref' => 'typolink_tag,url',
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
]
|
||||
],
|
||||
'categories' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:sys_category.categories',
|
||||
'config' => [
|
||||
'type' => 'category'
|
||||
]
|
||||
],
|
||||
'latitude' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address.latitude',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'eval' => \FriendsOfTYPO3\TtAddress\Evaluation\LatitudeEvaluation::class,
|
||||
'default' => null,
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
]
|
||||
],
|
||||
'longitude' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address.longitude',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'eval' => \FriendsOfTYPO3\TtAddress\Evaluation\LongitudeEvaluation::class,
|
||||
'default' => null,
|
||||
'fieldControl' => [
|
||||
'locationMap' => [
|
||||
'renderType' => 'locationMapWizard'
|
||||
]
|
||||
],
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
]
|
||||
],
|
||||
],
|
||||
'types' => [
|
||||
'0' => [
|
||||
'showitem' => '
|
||||
--palette--;LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address_palette.name;name,
|
||||
image, description,
|
||||
--div--;LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address_tab.address,
|
||||
--palette--;LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address_palette.address;address,
|
||||
--palette--;LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address_palette.coordinates;coordinates,
|
||||
|
||||
--div--;LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address_tab.contact,
|
||||
--palette--;LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address_palette.contact;contact,
|
||||
--palette--;LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address_palette.organization;organization,
|
||||
--palette--;LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address_palette.building;building,
|
||||
--palette--;LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address_palette.social;social,
|
||||
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language,
|
||||
--palette--;;language,
|
||||
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access,
|
||||
--palette--;;paletteHidden,
|
||||
--palette--;;paletteAccess,
|
||||
--div--;' . 'LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:sys_category.tabs.category, categories
|
||||
'
|
||||
]
|
||||
],
|
||||
'palettes' => [
|
||||
'name' => [
|
||||
'showitem' => 'gender, title, title_suffix,--linebreak--,
|
||||
first_name, middle_name, last_name,--linebreak--,name,--linebreak--,slug'
|
||||
],
|
||||
'organization' => [
|
||||
'showitem' => 'position, company'
|
||||
],
|
||||
'address' => [
|
||||
'showitem' => 'address, --linebreak--,
|
||||
city, zip, region, --linebreak--,
|
||||
country, --linebreak--,'
|
||||
],
|
||||
'building' => [
|
||||
'showitem' => 'building, room'
|
||||
],
|
||||
'coordinates' => [
|
||||
'showitem' => 'latitude,longitude'
|
||||
],
|
||||
'contact' => [
|
||||
'showitem' => 'email, --linebreak--,
|
||||
phone, mobile, fax, --linebreak--,
|
||||
www, --linebreak--,
|
||||
birthday'
|
||||
],
|
||||
'social' => [
|
||||
'showitem' => 'skype, twitter, --linebreak--,
|
||||
linkedin, tiktok, --linebreak--,
|
||||
facebook, instagram'
|
||||
],
|
||||
'paletteHidden' => [
|
||||
'showitem' => 'hidden',
|
||||
],
|
||||
'paletteAccess' => [
|
||||
'label' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.access',
|
||||
'showitem' => '
|
||||
starttime;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:starttime_formlabel,
|
||||
endtime;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:endtime_formlabel,
|
||||
--linebreak--,
|
||||
fe_group;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:fe_group_formlabel
|
||||
',
|
||||
],
|
||||
'language' => ['showitem' => 'sys_language_uid, l10n_parent'],
|
||||
],
|
||||
];
|
||||
@@ -0,0 +1 @@
|
||||
mod.web_list.allowedNewTables := addToList(tt_address)
|
||||
@@ -0,0 +1,18 @@
|
||||
mod.wizards.newContentElement.wizardItems {
|
||||
plugins {
|
||||
elements {
|
||||
tx_ttaddress_listview {
|
||||
title = LLL:EXT:tt_address/Resources/Private/Language/db/locallang.xlf:extbase_title
|
||||
description = LLL:EXT:tt_address/Resources/Private/Language/db/locallang.xlf:extbase_description
|
||||
icon = EXT:tt_address/Resources/Public/Icons/ContentElementWizard.svg
|
||||
iconIdentifier = tt-address-plugin
|
||||
tt_content_defValues {
|
||||
CType = list
|
||||
list_type = ttaddress_listview
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
show := addToList(tx_ttaddress_listview)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
plugin.tx_ttaddress {
|
||||
view {
|
||||
# cat=plugin.tx_ttaddress/file; type=string; label=Path to template root (FE)
|
||||
templateRootPath = EXT:tt_address/Resources/Private/Templates/
|
||||
# cat=plugin.tx_ttaddress/file; type=string; label=Path to template partials (FE)
|
||||
partialRootPath = EXT:tt_address/Resources/Private/Partials/
|
||||
# cat=plugin.tx_ttaddress/file; type=string; label=Path to template layouts (FE)
|
||||
layoutRootPath = EXT:tt_address/Resources/Private/Layouts/
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
plugin.tx_ttaddress {
|
||||
view {
|
||||
templateRootPaths {
|
||||
0 = EXT:tt_address/Resources/Private/Templates/
|
||||
1 = {$plugin.tx_ttaddress.view.templateRootPath}
|
||||
}
|
||||
|
||||
partialRootPaths {
|
||||
0 = EXT:tt_address/Resources/Private/Partials/
|
||||
1 = {$plugin.tx_ttaddress.view.partialRootPath}
|
||||
}
|
||||
|
||||
layoutRootPaths {
|
||||
0 = EXT:tt_address/Resources/Private/Layouts/
|
||||
1 = {$plugin.tx_ttaddress.view.layoutRootPath}
|
||||
}
|
||||
}
|
||||
|
||||
settings {
|
||||
## Override settings if empty in flexform
|
||||
overrideFlexformSettingsIfEmpty = paginate.itemsPerPage, singlePid, pages, recursive, hidePagination, sortBy, sortOrder, groupsCombination
|
||||
|
||||
# comma separated list of page IDs containing address records
|
||||
pages =
|
||||
|
||||
# recursion level: same_page_only=0
|
||||
recursive =
|
||||
|
||||
# display mode: List=0, Detail=1, Map=2
|
||||
displayMode =
|
||||
|
||||
# groups combination: AND=0, OR=1
|
||||
groupsCombination =
|
||||
|
||||
# sort by field
|
||||
sortBy =
|
||||
|
||||
# order: ASC, DESC
|
||||
sortOrder =
|
||||
|
||||
# page ID of single view
|
||||
singlePid =
|
||||
|
||||
detail {
|
||||
## Set your lightbox here. The address records UID is appended, see fluid template
|
||||
imageClass = lightbox lightbox_
|
||||
|
||||
## Check PID of address record
|
||||
checkPidOfAddressRecord = 0
|
||||
}
|
||||
|
||||
map {
|
||||
|
||||
# leaflet, googleMaps, staticGoogleMaps
|
||||
rendering = leaflet
|
||||
|
||||
defaultPosition {
|
||||
lat = 48.3057664
|
||||
lng = 14.2873126
|
||||
}
|
||||
googleMaps {
|
||||
key =
|
||||
}
|
||||
staticGoogleMaps {
|
||||
parameters {
|
||||
key =
|
||||
size = 500x400
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
paginate {
|
||||
# can be overridden by plugin
|
||||
itemsPerPage = 10
|
||||
insertAbove = 0
|
||||
insertBelow = 1
|
||||
maximumNumberOfLinks = 10
|
||||
}
|
||||
|
||||
seo {
|
||||
pageTitle {
|
||||
properties = title,firstName,middleName,lastName
|
||||
glue = " "
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Rendering of tt_address, displayed by "Insert Record" content element
|
||||
tt_content.shortcut.variables.shortcuts.tables := addToList(tt_address)
|
||||
tt_content.shortcut.variables.shortcuts.conf.tt_address = USER
|
||||
tt_content.shortcut.variables.shortcuts.conf.tt_address {
|
||||
userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
|
||||
extensionName = TtAddress
|
||||
pluginName = ListView
|
||||
vendorName = FriendsOfTYPO3
|
||||
|
||||
settings =< plugin.tx_ttaddress.settings
|
||||
settings {
|
||||
displayMode = single
|
||||
insertRecord = 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
|
||||
.. _changelog:
|
||||
|
||||
Changelog
|
||||
---------
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 5
|
||||
:titlesonly:
|
||||
:glob:
|
||||
|
||||
v/8-1-1
|
||||
v/8-1-0
|
||||
v/8-0-3
|
||||
v/8-0-2
|
||||
v/8-0-1
|
||||
v/8-0-0
|
||||
v/7-1-0
|
||||
v/7-0-0
|
||||
v/6-1-0
|
||||
v/6-0-0
|
||||
v/5-3-0
|
||||
v/5-2-1
|
||||
v/5-2-0
|
||||
v/5-1-2
|
||||
v/5-1-1
|
||||
v/5-1-0
|
||||
v/5-0-0
|
||||
v/4-3-0
|
||||
v/4-2-0
|
||||
v/4-1-0
|
||||
v/4-0-1
|
||||
v/4-0-0
|
||||
@@ -0,0 +1,220 @@
|
||||
4.0.0 - 2018-12-12
|
||||
==================
|
||||
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
.. only:: html
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
:depth: 3
|
||||
|
||||
|
||||
Important changes
|
||||
-----------------
|
||||
|
||||
Deprecated pi1 plugin
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
The plugin based on `AbstractPlugin` (formerly known as pibase) has been marked as deprecated and will be removed with
|
||||
version 5.0.0. If you still want to use this version you need to enable it in the settings of the extension manager.
|
||||
|
||||
Changed vendor name
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
The vendor name has been changed from `TYPO3` to `FriendsOfTYPO3`. This change is only relevant if you or any extension
|
||||
you are using extends tt_address.
|
||||
|
||||
Installing the extension via composer **did not** change and is still `composer req friendsoftypo3/tt-address`.
|
||||
|
||||
Features
|
||||
--------
|
||||
|
||||
Extbase & Fluid
|
||||
^^^^^^^^^^^^^^^
|
||||
A new plugin has been added which is based on extbase & fluid, 2 very well known concepts of TYPO3 and its eco system.
|
||||
|
||||
The default templates are based on Twitter Bootstrap to have a well known code base.
|
||||
|
||||
Rich snippets
|
||||
^^^^^^^^^^^^^
|
||||
The templates integrate rich snippets for every field by default.
|
||||
|
||||
Code base
|
||||
^^^^^^^^^
|
||||
The code base of tt_address has been changed and improved in every area. To keep the quality high, the whole code base
|
||||
is now covered with unit and functional tests which are executed with every commit and pull request.
|
||||
|
||||
.. image:: https://coveralls.io/repos/github/FriendsOfTYPO3/tt_address/badge.svg?branch=master
|
||||
:target: https://coveralls.io/github/FriendsOfTYPO3/tt_address?branch=master
|
||||
|
||||
.. image:: https://styleci.io/repos/51592958/shield?branch=master
|
||||
:target: https://styleci.io/repos/51592958/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
All Changes
|
||||
-----------
|
||||
This is a list of all changes in this release: ::
|
||||
|
||||
2018-12-12 [TASK] Rename sections (Commit 8ca949a by Georg Ringer)
|
||||
2018-12-07 [!!!][TASK] Use template sections for displayMode (Commit 6a89e3f by Georg Ringer)
|
||||
2018-12-06 [TASK] Change singlerecord DB (Commit 7dd7f45 by Georg Ringer)
|
||||
2018-12-05 [DOC] Update changelog (Commit 758cc37 by Georg Ringer)
|
||||
2018-12-05 [TASK] Improve flexforms (Commit fce71c7 by Georg Ringer)
|
||||
2018-12-04 [TASK] Adopt icon (Commit 65361d0 by Georg Ringer)
|
||||
2018-12-03 Apply fixes from StyleCI (#116) (Commit ca78158 by Georg Ringer)
|
||||
2018-12-02 [BUGFIX] Improve TCA for sys_language_uid (Commit 852f865 by Georg Ringer)
|
||||
2018-11-29 [FEATURE] Add page tree icon (Commit c060811 by Georg Ringer)
|
||||
2018-11-28 [TASK] Update icons (Commit 745f93a by Georg Ringer)
|
||||
2018-11-27 [TASK] Adopt readme (Commit ae60199 by Georg Ringer)
|
||||
2018-11-27 [DOC] Add changelog (Commit 7008ed4 by Georg Ringer)
|
||||
2018-11-26 [TASK] Improve docs (Commit 7e5ffdc by Georg Ringer)
|
||||
2018-11-26 [TASK] Code cleanup (Commit 3ca26f8 by Georg Ringer)
|
||||
2018-11-26 Apply fixes from StyleCI (#112) (Commit 7edb065 by Georg Ringer)
|
||||
2018-11-26 [BUGFIX] Add missing use statement (Commit ca1508d by Georg Ringer)
|
||||
2018-11-26 [DOC] Fix some typos in manual (Commit fae3ec4 by Georg Ringer)
|
||||
2018-11-25 [BUGFIX] Make the update wizard work (Commit dedc6a1 by Georg Ringer)
|
||||
2018-11-25 [BUGFIX] Fix update wizard (#110) (Commit b55b042 by Georg Ringer)
|
||||
2018-11-25 [TASK] Add deprecation info to LegacyPluginController (Commit 7a93e5c by Georg Ringer)
|
||||
2018-11-24 [TASK] Add github issue templates (Commit 7fdeacb by Georg Ringer)
|
||||
2018-11-24 [TASK] Improve docs (Commit 18e1527 by Georg Ringer)
|
||||
2018-11-24 [TASK] Fix getter & setter for linkedin propery (Commit 22070bb by Georg Ringer)
|
||||
2018-11-24 [CLEANUP] Rename linkedin property (Commit 9204bf8 by ©lemens)
|
||||
2018-11-24 [CLEANUP] Rename linkedin property (Commit 285188e by ©lemens)
|
||||
2018-11-24 [FEATURE] Improve frontend (#103) (Commit f4d21b4 by Georg Ringer)
|
||||
2018-11-23 [TASK] Add missing indexed_search comment (Commit bfe773d by Georg Ringer)
|
||||
2018-11-22 [TASK] Remove old wizards (Commit 37bb913 by Georg Ringer)
|
||||
2018-11-22 Apply fixes from StyleCI (#101) (Commit 6ba4f1d by Georg Ringer)
|
||||
2018-11-22 [BUGFIX] Ignore default sorting (Commit 6938959 by Georg Ringer)
|
||||
2018-11-22 Apply fixes from StyleCI (#100) (Commit 51d9ca0 by Georg Ringer)
|
||||
2018-11-22 [TASK] Add .gitattributes file (Commit 9d002eb by Georg Ringer)
|
||||
2018-11-22 [TASK] Move local build files (Commit 7530bfc by Georg Ringer)
|
||||
2018-11-22 [TASK] Update license block (Commit aa52037 by Georg Ringer)
|
||||
2018-11-22 [TASK] Remove wip map rendering (Commit be1e040 by Georg Ringer)
|
||||
2018-11-22 Update README.md (Commit 7f02260 by Georg Ringer)
|
||||
2018-11-22 [TASK] Check coverage (#96) (Commit 46a05fb by Georg Ringer)
|
||||
2018-11-21 Apply fixes from StyleCI (#95) (Commit 5213bdb by Georg Ringer)
|
||||
2018-11-21 [TASK] Add tests for actions (Commit 3227ce9 by Georg Ringer)
|
||||
2018-11-21 [!!!][TASK] Remove HeaderDataViewHelper (Commit 7c813ca by Georg Ringer)
|
||||
2018-11-21 Apply fixes from StyleCI (#94) (Commit fad073f by Georg Ringer)
|
||||
2018-11-21 [TASK] Use demand object for creating proper queries (#93) (Commit 19653e6 by Georg Ringer)
|
||||
2018-11-21 [TASK] Add functional testing (#92) (Commit 4125dad by Georg Ringer)
|
||||
2018-11-20 Merge pull request #87 from FriendsOfTYPO3/analysis-qxoNQB (Commit cd4cb37 by Georg Ringer)
|
||||
2018-11-20 Apply fixes from StyleCI (Commit 3d3d010 by Georg Ringer)
|
||||
2018-11-20 [BUGFIX] Typecase int in migration #62 (Commit e532d4c by Georg Ringer)
|
||||
2018-11-20 [!!!][TASK] Drop custom pagination (Commit 78cfa5c by Georg Ringer)
|
||||
2018-11-20 [TASK] Add test to LegacyPluginSelector (Commit d5370b6 by Georg Ringer)
|
||||
2018-11-20 [TASK] Add test for AddFieldsToSelector (Commit 9c0545d by Georg Ringer)
|
||||
2018-11-20 [TASK] Add test for realurl hook (Commit f1e6254 by Georg Ringer)
|
||||
2018-11-20 [TASK] Add styleci badge (Commit 537ce01 by Georg Ringer)
|
||||
2018-11-20 [TASK] Improve code quality (Commit ca74c7d by Georg Ringer)
|
||||
2018-11-20 [TASK] Add test for setting merge (Commit 0c920bc by Georg Ringer)
|
||||
2018-11-20 [TASK] More tests to AddressController (Commit fec5bd0 by Georg Ringer)
|
||||
2018-11-20 [TASK] Improve readme (Commit 5a58908 by Georg Ringer)
|
||||
2018-11-19 Merge pull request #77 from FriendsOfTYPO3/analysis-qxo4NO (Commit 2f109cc by Georg Ringer)
|
||||
2018-11-19 Apply fixes from StyleCI (Commit 8ab407c by Georg Ringer)
|
||||
2018-11-19 [TASK] Add styleci configuration (Commit 62f0290 by Georg Ringer)
|
||||
2018-11-19 Merge pull request #75 from georgringer/master (Commit b140a04 by Georg Ringer)
|
||||
2018-11-19 [TASK] Add more tests and improve code (Commit 8f1e2f2 by Georg Ringer)
|
||||
2018-11-19 [TASK] Allow php7.2 with 8 (Commit d238f58 by Georg Ringer)
|
||||
2018-11-19 fix test (Commit e78f771 by Georg Ringer)
|
||||
2018-11-19 [TASK] Add testing (Commit 95c5dc6 by Georg Ringer)
|
||||
2018-11-19 [TASK] More (Commit dc1b5b8 by Georg Ringer)
|
||||
2018-11-17 [TASK] Improve category (Commit aab52ef by Georg Ringer)
|
||||
2018-11-17 [TASK] Rework everything (Commit dc2b814 by Georg Ringer)
|
||||
2018-11-15 [TASK] Rename namespace (Commit 462b6d5 by Georg Ringer)
|
||||
2018-11-15 [TASK] Move ext icon (Commit a44f473 by Georg Ringer)
|
||||
2018-11-14 [TASK] Make legacy plugin compatible with v9 (Commit c8c0855 by Benni Mack)
|
||||
2018-11-13 [CLEANUP] Added remarks, applied coding guidelines from Core (Commit 4b1bef5 by Benni Mack)
|
||||
2018-11-13 Merge pull request #71 from BastianBalthasarBux/master (Commit cebe25e by Benni Mack)
|
||||
2018-11-12 [TASK] Allow whitespaces for telephonenumbers (Commit 3bcdbd6 by clemens.riccabona)
|
||||
2018-11-12 [FOLLOWUP][BUGFIX] Type mismatch in updater script (Commit 3fb0df7 by root)
|
||||
2018-11-12 [BUGFIX] Type mismatch in updater script (Commit 08e755e by root)
|
||||
2018-11-08 [TASK] Add some iterators as addressing a single FAL image in a set of images is not possible anymore by adding the index in FLUID since v9 (Commit 6976bef by Clemens Riccabona)
|
||||
2018-11-08 [TASK] Fix link wizard for field webpage, because of constantly changing TCA (Commit 6ec5776 by Clemens Riccabona)
|
||||
2018-11-08 [TASK] Make compatible with version 9 and remove some smaller bugs for 8 and 9 (Commit 9dea60c by Clemens Riccabona)
|
||||
2018-11-08 Merge pull request #12 from halbkreativ/bugfix/make-rootpaths-overridable (Commit aba40bd by ©lemens)
|
||||
2018-11-07 [TASK] remove Address folder from default Template path (Commit 291a98c by Christoph Schwob)
|
||||
2018-11-07 [TASK] use *RootPaths array instead of strings to make it overridable (Commit dd6b49e by Christoph Schwob)
|
||||
2018-11-03 [BUGFIX] Two small issues introduced with solving #11 (Commit e9db5a1 by ©lemens)
|
||||
2018-11-01 [BUGFIX] Make sorting work with singleRecord selection (Commit 6510910 by Clemens Riccabona)
|
||||
2018-10-26 [CLEANUP] remove empty language files (Commit 3228bed by Clemens Riccabona)
|
||||
2018-10-26 [CLEANUPS] Moving things to their respective files according to the changes on v8 concerning ext_localconf.php and ext_tables.php (Commit d46887b by Clemens Riccabona)
|
||||
2018-10-26 [BUGFIX] Re-add legacy plugin (Commit c63fb49 by Clemens Riccabona)
|
||||
2018-10-26 [CLEANUP] Cleanup language files (Commit 180f519 by Clemens Riccabona)
|
||||
2018-10-26 [CLEANUP] More cleanups of old, obsolete things concerning pi1 and wizicon (Commit b8a9b6f by Clemens Riccabona)
|
||||
2018-10-26 [CLEANUP] Remove obsolete wizicon.php (Commit 6ff6a51 by Clemens Riccabona)
|
||||
2018-10-26 [CLEANUP] Remove one more(git add --all) empty and obsolete default_hcard.htm (Commit b943fb4 by Clemens Riccabona)
|
||||
2018-10-26 [CLEANUP] Remove empty and obsolete default_hcard.htm (Commit f236d54 by Clemens Riccabona)
|
||||
2018-10-26 [BUGFIX][CLEANUP] Fix broken pagination viewhelper, remove some useless language files, fix bug with localization (Commit 1f6f82d by Clemens Riccabona)
|
||||
2018-10-23 [TASK] Hide legacy plugin if not activated in EM configuration (Commit ad5a935 by Clemens Riccabona)
|
||||
2018-10-19 [TASK][FOLLOWUP] Cleanup after rebasing (Commit 3d950f4 by Clemens Riccabona)
|
||||
2018-06-28 [FOLLOWUP][TASK] Merging master with fork - wizicon part of the story (Commit d0daf44 by Clemens Riccabona)
|
||||
2018-06-28 [FOLLOWUP][TASK] Clean up things after monster-merge during coding night (Commit 270f0e8 by Clemens Riccabona)
|
||||
2018-06-25 [TASK] Rebase fork with current master (Commit 549ca0e by Clemens Riccabona)
|
||||
2018-06-23 [FOLLOWUP] Solve conflicts with upstream (Commit fe405b7 by Clemens Riccabona)
|
||||
2018-06-23 [FOLLOWUP] Solve conflicts with upstream (Commit 59498e0 by Clemens Riccabona)
|
||||
2018-05-25 [BUGIFIX] Fix error "setOrderings" (Commit e9fb490 by Falk Gebauer)
|
||||
2017-06-23 [BUGFIX] Remove @deprecated renderMode from f:flashMessages (Commit 533e759 by ©lemens)
|
||||
2017-06-23 [BUGFIX] Remove @deprecated renderMode (Commit 944d738 by ©lemens)
|
||||
2017-04-23 [CLEANUP] Remove unnecessary stdWrap functionality for TypoScript/FlexForm overridings (Commit 7cfec8c by Clemens Riccabona)
|
||||
2017-04-23 [TASK] Smaller optical enhancements for FE (Commit 71295c4 by ©lemens)
|
||||
2017-04-23 [TASK] Smaller optical enhancements for FE (Commit a752b9e by Clemens Riccabona)
|
||||
2017-04-18 [BUGFIX] Correct headlines in README.md (Commit 8031e99 by ©lemens)
|
||||
2017-04-18 [CLEANUP] Remove template from old path (Commit c3f57ed by ©lemens)
|
||||
2017-04-18 [TASK] Add Fluid and Extbase Controller and output (Commit 4fdc8c2 by Clemens Riccabona)
|
||||
2017-04-05 [BUGFIX] Correct mixedup l10n and l18n fields and add some language-exclusions (Commit 08150ad by Clemens Riccabona)
|
||||
2017-04-04 [TASK] Add possibility to translate records; ATM only backend supports Multilanguage address records (Commit 0d01955 by Clemens Riccabona)
|
||||
2017-04-04 [TASK] Move locallang_tca.xml to xliff in appropriate folder; Adding some missing german labels; Correction of some locallang references to EXT:cms not working anymore in TYPO3 8 (Commit 5240d2e by Clemens Riccabona)
|
||||
2017-04-04 [TASK] Move locallang_csh.xml to XLIFF in Resources/Private/Language/ (Commit cd8de7e by Clemens Riccabona)
|
||||
2017-04-04 [TASK] Move ce_wiz to new Resources folder and make pi1_wizicon ready for .xlf (Commit 3198088 by Clemens Riccabona)
|
||||
2017-04-04 [TASK] Move hcard.gif to new Resources folder (Commit d0f05f6 by Clemens Riccabona)
|
||||
2018-09-06 Merge pull request #69 from randomresult/master (Commit bf20f30 by ©lemens)
|
||||
2018-09-05 Change birthday - eval (Commit b167aa4 by Harry Glatz)
|
||||
2018-06-14 [BUGFIX] Fix wrong usage in legacy plugin (Commit 269080c by Benni Mack)
|
||||
2018-01-19 [TASK] Update composer.json license definition (Commit 53362f2 by Stefan Neufeind)
|
||||
2017-10-30 Require specific core package in composer.json (Commit cfbf3b0 by Benni)
|
||||
2017-09-07 Merge pull request #49 from IchHabRecht/fetch-absolute-template (Commit 5c83fb3 by Benni)
|
||||
2017-09-07 [BUGFIX] Fetch absolute template code (Commit c196cea by Nicole Cordes)
|
||||
2017-08-22 [TASK] Move default template for LegacyPlugin to Resources/Public (Commit 99c52e1 by Benni Mack)
|
||||
2017-08-22 [TASK] Minor improvements to TCA/FormEngine hooks (Commit 99550bc by Benni Mack)
|
||||
2017-08-22 [TASK] Move old FormEngine methods to single class (Commit b08837c by Benni Mack)
|
||||
2017-08-22 [TASK] Remove superfluous check for settings on hook registration (Commit 231b8e6 by Benni Mack)
|
||||
2017-08-22 [BUGFIX] Use proper PHP class location for pi-based plugin (Commit 94e24b4 by Benni Mack)
|
||||
2017-08-22 [TASK] Move TypoScript to Configuration/TypoScript/LegacyPlugin (Commit fa08c47 by Benni Mack)
|
||||
2017-08-22 [!!!][TASK] Move pi1/*php to LegacyPluginController (Commit da66366 by Benni Mack)
|
||||
2017-08-22 [BUGFIX] Use proper output / labels in FlexForm / TCA (Commit 7b2d8f1 by Benni Mack)
|
||||
2017-08-22 [TASK] Add new content element wizard item via PageTSconfig (Commit 35f71f7 by Benni Mack)
|
||||
2017-08-11 [TASK] Migrate locallang_tca.xml to xlf (Commit 3af9057 by Benni Mack)
|
||||
2017-08-11 [TASK] Drop CSH support (Commit d19cc17 by Benni Mack)
|
||||
2017-08-11 [TASK] Migrate locallang_pi1.xml to XLF format (Commit 685a71a by Benni Mack)
|
||||
2017-08-11 [TASK] Remove TSconfig of tt_address_group (Commit d13c5b4 by Benni Mack)
|
||||
2017-08-11 [TASK] Cleanup of Extbase TypoScript configuration (Commit 80e814a by Benni Mack)
|
||||
2017-08-11 [CLEANUP] Use proper PHP variables and class names in ext_localconf.php (Commit e39a440 by Benni Mack)
|
||||
2017-08-11 [TASK] Cleanup pi1 class and remove empty pi1/locallang.xml (Commit 122bb4b by Benni Mack)
|
||||
2017-08-11 [TASK] Moved locallang.xml labels into locallang_pi1.xml file (Commit 3bcb5d9 by Benni Mack)
|
||||
2017-08-11 [TASK] Moved new content element wizard hook to proper class (Commit 0aaa111 by Benni Mack)
|
||||
2017-08-11 [TASK] Cleanup AddFilesToSelector Tca proc items call (Commit abc3cf7 by Benni Mack)
|
||||
2017-08-11 [TASK] Renamed FlexForm Language File (Commit c5f308a by Benni Mack)
|
||||
2017-08-11 [TASK] Move CSH locallang file to Resources/Private/Language (Commit a7b7aae by Benni Mack)
|
||||
2017-08-09 [TASK] Move locallang_tca.xml to Resources/Private/Language (Commit 60eed63 by Benni Mack)
|
||||
2017-08-09 [TASK] Move Wizard Icon to Resources/Public/Icons (Commit 935c552 by Benni Mack)
|
||||
2017-08-09 [TASK] Moved FlexForm to Configuration/FlexForms (Commit 3e2d453 by Benni Mack)
|
||||
2017-08-09 [!!!][TASK] Removed very old TypoScript definition / template (Commit 7403458 by Benni Mack)
|
||||
2017-08-09 [TASK] Removed unused TCA option "canNotCollapse" (Commit d482ebd by Benni Mack)
|
||||
2017-08-09 [TASK] Raised minimum TYPO3 version to 7 LTS (Commit 719051e by Benni Mack)
|
||||
2017-08-09 [RELEASE] tt_address 3.3.0 (Commit 36bbf57 by Benni Mack)
|
||||
2017-07-29 Merge pull request #42 from janmayer/psql-double-quotes (Commit 8227a55 by ©lemens)
|
||||
2017-07-29 Merge pull request #40 from marcobiedermann/feature/categories (Commit d550a05 by ©lemens)
|
||||
2017-07-28 Postgresql compatibility (Commit 6867998 by Jan Mayer)
|
||||
2017-06-16 Merge pull request #39 from mindscreen/bugfix/image-rendering (Commit 5a85949 by Benni)
|
||||
2017-06-16 Merge pull request #37 from chriwo/bugfix-phpversion (Commit c4b9477 by Benni)
|
||||
2017-06-16 Add version constrain for php version (Commit 1b6abcf by Christian Wolfram)
|
||||
2017-06-07 add getter and setter methods for categories (Commit 1d5edd5 by Marco Biedermann)
|
||||
2017-05-19 Use string values in typoscript configuration (Commit 7487df6 by Thomas Heilmann)
|
||||
2017-04-28 [BUGFIX] Wrong error syntax for array (Commit b045b04 by Christian Wolfram)
|
||||
|
||||
|
||||
|
||||
This list has been created by using `git log v3.2.4..HEAD --abbrev-commit --pretty='%ad %s (Commit %h by %an)' --date=short`.
|
||||
@@ -0,0 +1,40 @@
|
||||
4.0.1 - 2018-12-21
|
||||
==================
|
||||
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
.. only:: html
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
:depth: 3
|
||||
|
||||
|
||||
Breaking changes
|
||||
----------------
|
||||
|
||||
Set exclude value in flexform fields
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
All fields of the extbase variant flexform have been improved by defining `<exclude>1</exclude>`.
|
||||
This makes it possible to limit an editor to specific fields of the plugin.
|
||||
|
||||
If editors are allowed to create and edit plugins of tt_address (extbase variant) you must enable the needed fields
|
||||
in the backend usergroup configuration after updating from version 4.0.0.
|
||||
|
||||
If only admins are allowed to create and edit plugins, no action is required.
|
||||
|
||||
All Changes
|
||||
-----------
|
||||
This is a list of all changes in this release: ::
|
||||
|
||||
2018-12-21 Apply fixes from StyleCI (#135) (Commit 14ba5da by Georg Ringer)
|
||||
2018-12-21 [BUGFIX] Show language fields in TCA (Commit f602a24 by Georg Ringer)
|
||||
2018-12-21 Use correct slack and stackoverflow info in support question issue template (#131) (Commit de03046 by Patrick Lenk)
|
||||
2018-12-17 [BUGFIX] Use correct namespace for realurl auto conf (Commit 352f2d8 by Georg Ringer)
|
||||
2018-12-14 [!!!][TASK] Add exclude 1 to flexform fields (Commit 31bd8fa by Georg Ringer)
|
||||
2018-12-14 [BUGFIX] Use correct image reference in LegacyPlugin (Commit 2ff2f36 by Georg Ringer)
|
||||
2018-12-14 [BUGFIX] Use MarkerBasedTemplateService (Commit 0a21bb3 by Georg Ringer)
|
||||
2018-12-14 [BUGFIX] Fix get groups query for address in legacy plugin controller (#126) (Commit 80455cc by GertHammes)
|
||||
|
||||
|
||||
This list has been created by using `git log 4.0.0..HEAD --abbrev-commit --pretty='%ad %s (Commit %h by %an)' --date=short`.
|
||||
@@ -0,0 +1,34 @@
|
||||
4.1.0 - 2018-02-04
|
||||
==================
|
||||
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
.. only:: html
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
:depth: 3
|
||||
|
||||
|
||||
Features
|
||||
--------
|
||||
|
||||
Add subcategory flag
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
The category selection is extended by a new field in the FlexForms settings called **Include subcategories**.
|
||||
By default it is disabled and only if enabled, sub categories are taken into account as well.
|
||||
|
||||
All Changes
|
||||
-----------
|
||||
This is a list of all changes in this release: ::
|
||||
|
||||
2019-01-31 [FEATURE Add subcategory flag (#151) (Commit e975c02 by Georg Ringer)
|
||||
2019-01-31 [BUGFIX] Use pagination settings in template (Commit f9bc928 by Georg Ringer)
|
||||
2019-01-31 [BUGFIX] Respect sorting field in customSelection (Commit 36477dd by Georg Ringer)
|
||||
2019-01-31 [TASK] Add migration of legacy plugins to extbase plugins (#140) (Commit 82b176b by Christoph Lehmann)
|
||||
2019-01-31 [TASK] Add checks for PHP 7.3 (Commit 7403729 by Georg Ringer)
|
||||
2019-01-31 [TASK] Add sorting to field selector (Commit 25cc4bb by Georg Ringer)
|
||||
2019-01-11 Bugfix: Overwriting of storage pid from flexform (#139) (Commit 1cc3a85 by Christoph Lehmann)
|
||||
2019-01-09 [BUGFIX] Use f.link.typolink for links (Commit 4e36575 by Georg Ringer)
|
||||
|
||||
This list has been created by using `git log 4.0.1..HEAD --abbrev-commit --pretty='%ad %s (Commit %h by %an)' --date=short`.
|
||||
@@ -0,0 +1,84 @@
|
||||
4.2.0 - 2019-03-15
|
||||
==================
|
||||
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
.. only:: html
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
:depth: 3
|
||||
|
||||
|
||||
Features
|
||||
--------
|
||||
The following features have been added to tt_address.
|
||||
|
||||
Map support
|
||||
^^^^^^^^^^^
|
||||
Since version *4.2.0* the extension is capable of rendering records on a map.
|
||||
The following variants are included by default:
|
||||
|
||||
- Leaflet
|
||||
- Google Maps
|
||||
- Static Google Maps
|
||||
|
||||
It is described in detail in :ref:`the docs <users-manual-maps>`.
|
||||
|
||||
Allow overriding demand object
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
It is now possible to override the configuration used to retrieve the proper records.
|
||||
It is described in detail in :ref:`the docs <tutorial-overrideDemand>`.
|
||||
|
||||
A simple example can look like this.
|
||||
|
||||
.. code-block:: html
|
||||
|
||||
<f:link.page
|
||||
additionalParams="{tx_ttaddress_listview:{override:{categories: 1}}}">
|
||||
Category 1
|
||||
</f:link.page>
|
||||
|
||||
Slug field
|
||||
^^^^^^^^^^
|
||||
The address record has been extended by a slug field.
|
||||
|
||||
Helper getters
|
||||
^^^^^^^^^^^^^^
|
||||
The following getters have been added to the Address model:
|
||||
|
||||
- `{address.fullName}`: Gives you the full name including title, first, middle and last name
|
||||
- `{address.wwwSimplified}`: Gives you the the web link without any possible parameters like *_blank*
|
||||
|
||||
|
||||
Configurable telephone validation regex
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
The regex used for validation the telephone number of a record is now configurable within
|
||||
the Extension Manager's settings.
|
||||
|
||||
|
||||
All Changes
|
||||
-----------
|
||||
This is a list of all changes in this release: ::
|
||||
|
||||
2019-03-03 [TASK] Add pages to all functional checks (Commit 0213651 by Georg Ringer)
|
||||
2019-02-28 [FEATURE] Allow overriding demand object (#186) (Commit 506c3e1 by Georg Ringer)
|
||||
2019-02-28 [FEATURE] Add slug field (Commit 926520a by Georg Ringer)
|
||||
2019-02-27 [TASK] Move to Icon-API via requireJS (Commit 508b546 by ©lemens)
|
||||
2019-02-27 [TASK] Use phpunit/codecov ^5 (Commit 3acf8e6 by Georg Ringer)
|
||||
2019-02-17 [BUGFIX] Fix failing update wizard (#180) (Commit 556db7a by Georg Ringer)
|
||||
2019-02-17 [TASK] Added "various" as additional option for gender field (#178) (Commit 2609f07 by Torben Hansen)
|
||||
2019-02-14 [FEATURE] Geocoding Wizard in TCA (Commit 3a4673f by Georg Ringer)
|
||||
2019-02-12 [BUGFIX] Respect bool values in overrideFlexformSettingsIfEmpty (#170) (Commit 76d149e by Georg Ringer)
|
||||
2019-02-11 [BUGFIX] Check for invalid sorting field (#168) (Commit e161dc4 by Georg Ringer)
|
||||
2019-02-11 [TASK] Respect link of sys_file_references in template (Commit 85f5de8 by Georg Ringer)
|
||||
2019-02-11 [TASK] Skip inconsistent flexform in migration task (#161) (Commit b4483e5 by Torben Hansen)
|
||||
2019-02-10 [BUGFIX] Show link without attributes (#164) (Commit 4f1d4c1 by Georg Ringer)
|
||||
2019-02-08 [FEATURE] Added allowLanguageSynchronization to TCA (#162) (Commit 0ed1eca by Torben Hansen)
|
||||
2019-02-08 [TASK] Minor bugfiles and improvements (#159) (Commit 2b6f83e by Torben Hansen)
|
||||
2019-02-06 [FEATURE] Make telephone regex configurable (#157) (Commit 5b62953 by Georg Ringer)
|
||||
2019-02-04 Merge pull request #153 from svewap/master (Commit df4c2b9 by ©lemens)
|
||||
2019-02-01 Allow hyphen for phone number extension. See https://en.wikipedia.org/wiki/National_conventions_for_writing_telephone_numbers#Germany (Commit 24a96e1 by Sven Wappler)
|
||||
|
||||
|
||||
This list has been created by using `git log 4.1.0..HEAD --abbrev-commit --pretty='%ad %s (Commit %h by %an)' --date=short`.
|
||||
@@ -0,0 +1,66 @@
|
||||
4.3.0 - 2019-04-25
|
||||
==================
|
||||
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
.. only:: html
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
:depth: 3
|
||||
|
||||
|
||||
Features
|
||||
--------
|
||||
The following features have been added to tt_address.
|
||||
|
||||
RTE for description
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
The description field is now rendered using an RTE.
|
||||
|
||||
Method to get raw query
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
A new method `\FriendsOfTYPO3\TtAddress\Domain\Repository\AddressRepository::getSqlQuery`
|
||||
has been added which can be used to retrieve the raw database query which could be used for further calls.
|
||||
Example
|
||||
|
||||
.. code-block:: php
|
||||
|
||||
$demand = new Demand();
|
||||
$demand->setPages(['1', '2']);
|
||||
$sql = $this->addressRepository->getSqlQuery($demand);
|
||||
|
||||
|
||||
Important changes
|
||||
-----------------
|
||||
|
||||
The default rendering option for maps has been changed to `leaflet`.
|
||||
|
||||
Thanks to
|
||||
---------
|
||||
|
||||
Thanks to all all contributors, especially to
|
||||
- Ralf Tönjes
|
||||
- Christoph Lehmann
|
||||
- Georg Ringer
|
||||
|
||||
and also thanks to *Studio Mitte Digital Media Gmbh* (https://studiomitte.com/) for sponsoring work time and supporting this project!
|
||||
|
||||
All Changes
|
||||
-----------
|
||||
This is a list of all changes in this release: ::
|
||||
|
||||
2019-04-24 fixed wrong language variables for gender various (#216) (Commit c73de2e by Ralf Tönjes)
|
||||
2019-04-24 set default rendering to leaflet as described in the documents (#213) (Commit 67298af by Ralf Tönjes)
|
||||
2019-04-12 [BUGFIX] Move typecast (Commit 4c2213d by Georg Ringer)
|
||||
2019-04-11 [TASK] Add type and eval to tstamp & crdate fields (Commit 2f883e3 by Georg Ringer)
|
||||
2019-04-11 [TASK] Change birthday field to bigint (Commit b284722 by Georg Ringer)
|
||||
2019-04-04 [FEATURE] Provide raw query option (#205) (Commit 79be032 by Georg Ringer)
|
||||
2019-04-04 [FEATURE] Cache invalidation for address records (#207) (Commit 296d2df by Christoph Lehmann)
|
||||
2019-04-01 [TASK] Enable RTE for description field (Commit 9db05d7 by Georg Ringer)
|
||||
2019-03-28 [BUGFIX] Add type cast to array to avoid errors (Commit 6c0c7e2 by Georg Ringer)
|
||||
2019-03-22 [DOC] Describe usage of extender for tt_address (Commit 450317e by Georg Ringer)
|
||||
2019-03-22 [BUGFIX] Provide missing labels for flexform sorting (Commit 54ddf48 by Georg Ringer)
|
||||
|
||||
|
||||
This list has been created by using `git log 4.2.0..HEAD --abbrev-commit --pretty='%ad %s (Commit %h by %an)' --date=short`.
|
||||
@@ -0,0 +1,57 @@
|
||||
5.0.0 - 2019-03-08
|
||||
==================
|
||||
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
.. only:: html
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
:depth: 3
|
||||
|
||||
|
||||
Important changes
|
||||
-----------------
|
||||
|
||||
This release is the 1st release which supports TYPO3 10 and TYPO3 9 LTS only.
|
||||
This also means that the support for version 8 has been removed.
|
||||
|
||||
However version 8 will be still supported for priority bugfixes in the 4.x branch.
|
||||
|
||||
Cleanup codebase
|
||||
^^^^^^^^^^^^^^^^
|
||||
The following code parts have been changed:
|
||||
|
||||
- Removal of the piBase/AbstractPlugin plugin
|
||||
- Removal of the file:`locallang_pi1.xlf` file.
|
||||
- Removal of the update wizards
|
||||
- Removal of hook to support EXT:realurl
|
||||
- Support of php:`$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['tt_address']` instead of the serialized configuration in :php:`$GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['tt_address']`
|
||||
|
||||
Use crowdin for localization
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
The project uses https://crowdin.com/project/typo3-extension-ttaddress for localization of the xlf files.
|
||||
|
||||
All Changes
|
||||
-----------
|
||||
This is a list of all changes in this release: ::
|
||||
|
||||
2019-09-03 [TASK] Remove empty localizations (Commit fc1b46a by Georg Ringer)
|
||||
2019-09-03 [TASK] Reduce duplicates in translations (Commit eeb20d9 by Georg Ringer)
|
||||
2019-09-03 [TASK] Release 5.0.0 (Commit 48feed3 by Georg Ringer)
|
||||
2019-09-02 [TASK] Add .crowdin.yml to .gitattributes (Commit c5aac11 by Georg Ringer)
|
||||
2019-09-02 [DOC] Improve release notes (Commit f87fed1 by Georg Ringer)
|
||||
2019-09-02 [!!!][TASK] Make it ready for 9+10 (Commit bff33d0 by Georg Ringer)
|
||||
2019-09-02 [TASK] Add more translations (Commit e2e4791 by Georg Ringer)
|
||||
2019-08-27 [TASK] Update translations (Commit fec3510 by Georg Ringer)
|
||||
2019-08-27 [TASK] Add all translations (Commit 05e65d7 by Georg Ringer)
|
||||
2019-08-27 Update Crowdin configuration file (Commit cc76ece by Georg Ringer)
|
||||
2019-08-27 Update Crowdin configuration file (Commit 1b1781a by Georg Ringer)
|
||||
2019-05-23 [TASK] Raise testing coverage (#229) (Commit 6781b0f by Georg Ringer)
|
||||
2019-05-23 fixed: SQL error: 'Incorrect integer value: '' for column 'l10n_parent' at row 1' (tt_address:NEW5cd1552965f6b253387324) on copy&paste tt_address record (#217) (Commit b0b7afe by Christian-Hackl)
|
||||
2019-05-23 [BUGFIX] Add mysql to the travis services (#227) (Commit de6268f by Georg Ringer)
|
||||
2019-05-20 [BUGFIX] Remove itemprop="email" from templates (Commit 9e06656 by Georg Ringer)
|
||||
2019-05-20 [BUGFIX] Use f:format.html for description (Commit 5f552dd by Georg Ringer)
|
||||
|
||||
|
||||
This list has been created by using `git log 4.3.0..HEAD --abbrev-commit --pretty='%ad %s (Commit %h by %an)' --date=short`.
|
||||
@@ -0,0 +1,66 @@
|
||||
5.1.0 - 2020-02-19
|
||||
==================
|
||||
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
.. only:: html
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
:depth: 3
|
||||
|
||||
|
||||
Important changes
|
||||
-----------------
|
||||
|
||||
Custom page title provider
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
A custom page title provider makes it possible to generate a page title on the detail view.
|
||||
|
||||
.. code-block:: typoscript
|
||||
|
||||
plugin.tx_ttaddress.settings.seo {
|
||||
pageTitle {
|
||||
properties = title,firstName,middleName,lastName
|
||||
glue = " "
|
||||
}
|
||||
}
|
||||
|
||||
Starttime + Endtime fields
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
A tt_address record can now have a start and end time. Please do a DB compare in Install Tool after updating!.
|
||||
|
||||
All Changes
|
||||
-----------
|
||||
This is a list of all changes in this release: ::
|
||||
|
||||
2020-02-18 [TASK] Allow 10x (Commit 48bd075 by Georg Ringer)
|
||||
2020-02-18 FEATURE] Add starttime & endtime fields (Commit 340f956 by Georg Ringer)
|
||||
2020-02-18 [TASK] Adopt flexform for 10 (Commit 2b9fd5e by Georg Ringer)
|
||||
2020-02-18 [BUGFIX]: Sync name field in localized records (#268) (Commit 730367c by hfuonlineservices)
|
||||
2020-02-05 [DOC] Escape \ (Commit a1df9f5 by Christian-Hackl)
|
||||
2019-12-18 [TASK] Add PHP 7.4 checks on travis (Commit 6720839 by Georg Ringer)
|
||||
2019-10-15 Fix syntax in count-condition (#258) (Commit 461c988 by Stefan Neufeind)
|
||||
2019-10-13 [TASK] Add persistence mapping for 10x (Commit 22f0fd3 by Georg Ringer)
|
||||
2019-10-01 [TASK] Use translate=no for strings with no translation (Commit 64f6544 by Georg Ringer)
|
||||
2019-09-13 [DOC] Start release notes of 5.1.0 (Commit 4e21e0b by Georg Ringer)
|
||||
2019-09-13 [FEATURE] Add page title provider for detail view (Commit 1bf95d9 by Georg Ringer)
|
||||
2019-09-09 [TASK] Fix more typos (Commit b956fba by Georg Ringer)
|
||||
2019-09-09 [TASK] Fix typo (Commit bc5b272 by Georg Ringer)
|
||||
2019-09-09 [TASK] Update translations (Commit 90e34a5 by Georg Ringer)
|
||||
2019-09-09 [TASK] Remove legacy TypoScript (Commit c06c4e5 by Georg Ringer)
|
||||
2019-09-03 [TASK] Add translations (Commit f3380ce by Georg Ringer)
|
||||
2019-09-03 New translations locallang_db.xlf (French) (Commit a9a33c3 by Georg Ringer)
|
||||
2019-09-03 New translations locallang.xlf (French) (Commit fa8f8be by Georg Ringer)
|
||||
2019-09-03 New translations locallang_ff.xlf (French) (Commit 91c8d89 by Georg Ringer)
|
||||
2019-09-03 New translations locallang.xlf (French) (Commit d25353b by Georg Ringer)
|
||||
2019-09-03 New translations locallang_db.xlf (French) (Commit 90d3275 by Georg Ringer)
|
||||
2019-09-03 New translations locallang_ff.xlf (TYPO3 In-Context Localization) (Commit e6cab8e by Georg Ringer)
|
||||
2019-09-03 New translations locallang_ff.xlf (Danish) (Commit 678b3bb by Georg Ringer)
|
||||
2019-09-03 New translations locallang_ff.xlf (German) (Commit 6ba5c12 by Georg Ringer)
|
||||
2019-09-03 New translations locallang_ff.xlf (Italian) (Commit 84692a6 by Georg Ringer)
|
||||
2019-09-03 [TASK] Fix translation for `pi1_flexform.singlePid` (Commit 9511431 by Georg Ringer)
|
||||
|
||||
|
||||
|
||||
This list has been created by using `git log 5.0.0..HEAD --abbrev-commit --pretty='%ad %s (Commit %h by %an)' --date=short`.
|
||||
@@ -0,0 +1,20 @@
|
||||
5.1.1 - 2020-03-30
|
||||
==================
|
||||
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
.. only:: html
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
:depth: 3
|
||||
|
||||
|
||||
|
||||
All Changes
|
||||
-----------
|
||||
This is a list of all changes in this release: ::
|
||||
|
||||
2020-03-30 [TASK] Remove exclude config from l10n_parent (Commit 2a01dc3 by Georg Ringer)
|
||||
|
||||
This list has been created by using `git log 5.1.0..HEAD --abbrev-commit --pretty='%ad %s (Commit %h by %an)' --date=short`.
|
||||
@@ -0,0 +1,22 @@
|
||||
5.1.2 - 2020-04-21
|
||||
==================
|
||||
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
.. only:: html
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
:depth: 3
|
||||
|
||||
|
||||
|
||||
All Changes
|
||||
-----------
|
||||
This is a list of all changes in this release: ::
|
||||
|
||||
2020-04-21 [TASK] Force 10.4 (#275) (Commit 86d6dba by Georg Ringer)
|
||||
2020-04-21 [BUGFIX] Take care about failing tests (#276) (Commit 0844912 by Georg Ringer)
|
||||
2020-04-15 [BUGFIX] Frontend Leaflet map: .getAttribute does not work on childNodes[i] (Commit 4fe8025 by ©lemens)
|
||||
|
||||
This list has been created by using `git log 5.1.1..HEAD --abbrev-commit --pretty='%ad %s (Commit %h by %an)' --date=short`.
|
||||
@@ -0,0 +1,78 @@
|
||||
5.2.0 - 22th September 2020
|
||||
===========================
|
||||
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
.. only:: html
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
:depth: 3
|
||||
|
||||
Important changes
|
||||
-----------------
|
||||
|
||||
Custom page title provider
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
All Changes
|
||||
-----------
|
||||
This is a list of all changes in this release: ::
|
||||
|
||||
|
||||
2020-09-22 [FEATURE] Plugin preview in page module (#302) (Commit ab91dd8 by Georg Ringer)
|
||||
2020-09-22 Merge pull request #305 from jokumer/patch-1 (Commit 15d3239 by Benni Mack)
|
||||
2020-09-22 Fix TCA locallang for field sys_language_uid (Commit ad4ac9e by jokumer)
|
||||
2020-09-21 [FEATURE] Provide filter TsConfig for allowedNewTables (Commit fcdb474 by Georg Ringer)
|
||||
2020-09-19 Merge pull request #271 from Patta/cleanup-plugin-title (Commit 2fdb254 by C. Riccabona)
|
||||
2020-09-19 Merge branch 'master' into cleanup-plugin-title (Commit bc2eb91 by C. Riccabona)
|
||||
2020-09-19 [TASK] Merge pull request #298 from mmunz/map-wizard-inline (Commit e868a9c by C. Riccabona)
|
||||
2020-09-16 Merge branch 'master' into cleanup-plugin-title (Commit 7bebe67 by C. Riccabona)
|
||||
2020-09-16 Merge branch 'master' into map-wizard-inline (Commit c704250 by C. Riccabona)
|
||||
2020-09-09 [BUGFIX] replace displayCondition for slug field (#294) (Commit 4501d1f by devmes)
|
||||
2020-08-26 Merge branch 'map-wizard-inline' of github.com:mmunz/tt_address into map-wizard-inline (Commit ee7e0cf by Manuel Munz)
|
||||
2020-08-26 [TASK] Make LocationMapWizard work with multiple latlon fields and when used in inline relations (Commit a0b63b5 by Manuel Munz)
|
||||
2020-08-26 rework the LocationMapWizard to work with multiple latlon fields and fields in inline relations (Commit d99ad20 by Manuel Munz)
|
||||
2020-08-19 [TASK] Apply fixes from StyleCI (#297) (Commit fd2d4e2 by Georg Ringer)
|
||||
2020-08-19 [TASK] Don't remove layout field for plugin (Commit e65d97b by Georg Ringer)
|
||||
2020-08-18 Merge branch 'master' into cleanup-plugin-title (Commit ee5ec0e by C. Riccabona)
|
||||
2020-08-16 [TASK] Update composer.json to recommended values (Commit 1fb0f8d by C. Riccabona)
|
||||
2020-08-16 Merge pull request #289 from BastianBalthasarBux/master (Commit ae17b13 by C. Riccabona)
|
||||
2020-08-16 Merge branch 'master' into master (Commit ff52db8 by C. Riccabona)
|
||||
2020-08-16 [FIX] Remove editlock (Commit 943039e by Clemens Riccabona)
|
||||
2020-08-16 [TASK] Add fe_group to palette access, resolves #279 (Commit dae2a4a by Clemens Riccabona)
|
||||
2020-08-14 [FIX] Enable risky mode (Commit b36b265 by C. Riccabona)
|
||||
2020-08-14 Merge pull request #286 from BastianBalthasarBux/master (Commit d0591f1 by C. Riccabona)
|
||||
2020-08-14 Merge branch 'master' into master (Commit 105b323 by C. Riccabona)
|
||||
2020-07-31 [BUGFIX] Load map also if scripts are loaded async (Commit 96a8c3e by C. Riccabona)
|
||||
2020-07-27 Merge pull request #283 from BastianBalthasarBux/master (Commit a390fa4 by C. Riccabona)
|
||||
2020-07-27 [TASK] Add test for setter/getter of slug (Commit e7a2057 by C. Riccabona)
|
||||
2020-07-27 [FIX] CGL - remove some whitespaces (Commit 86f76a7 by C. Riccabona)
|
||||
2020-07-27 [TASK] Add getter and setter for slug (Commit 4611cde by C. Riccabona)
|
||||
2020-06-13 Merge branch 'master' into cleanup-plugin-title (Commit 7b6cafe by C. Riccabona)
|
||||
2020-06-11 Merge pull request #278 from BastianBalthasarBux/master (Commit f88affc by ©lemens)
|
||||
2020-05-18 Update EvalcoordinatesUtility.php (Commit b29bd6e by Georg Ringer)
|
||||
2020-05-16 [FIX] eval coordinates test (Commit 4ae8786 by Clemens Riccabona)
|
||||
2020-05-16 [FIX] eval coordinates test (Commit 46c8b1b by Clemens Riccabona)
|
||||
2020-05-16 [FIX] sort order of tested array in unit tests ... (Commit 1afacd9 by Clemens Riccabona)
|
||||
2020-05-16 [FIX] Fix another test (Commit 24e5041 by Clemens Riccabona)
|
||||
2020-05-16 [FIX] Fix two other occurrences of coordinates length tests (Commit defb1c6 by Clemens Riccabona)
|
||||
2020-05-16 [TASK] Adjust tests for evalution of lat and lon due to optimized db sizes of coordinates (Commit ecd6ab3 by Clemens Riccabona)
|
||||
2020-05-16 [TASK] Update composer.json to avoid security message concerning unsecure TYPO3 versions (Commit ebb1644 by Clemens Riccabona)
|
||||
2020-05-16 Merge branch 'master' of https://github.com/FriendsOfTYPO3/tt_address (Commit f1e72b5 by Clemens Riccabona)
|
||||
2020-05-06 [!!!] Set slug eval to unique (Commit e3bcabc by Georg Ringer)
|
||||
2020-05-06 [TASK] Allow sortOrder by combined name field, feature request #261 (Commit 3ace437 by Clemens Riccabona)
|
||||
2020-05-06 [TASK] Re-add css-class btn for map-view singlePid link, remove duplicated title, remove hellip (not useful within buttons) (Commit c322877 by Clemens Riccabona)
|
||||
2020-05-06 [TASK] Include most parts from PR #274, a big thank you for that contribution goes to @colorcube (Commit 39eac8c by Clemens Riccabona)
|
||||
2020-05-06 [TASK][FOLLOWUP] Revert settings.map.singlePid, this will prevent from respecting pre-existing flexform field for mapView (Commit 1b1a7eb by Clemens Riccabona)
|
||||
2020-05-05 Merge branch 'master' of https://github.com/FriendsOfTYPO3/tt_address (Commit b57ec8f by Clemens Riccabona)
|
||||
2020-05-05 [TASK] Add some TS defaults (Commit f156922 by heikohaensge)
|
||||
2020-05-05 Merge branch 'master' into cleanup-plugin-title (Commit d1b6838 by ©lemens)
|
||||
2020-05-05 TCA migrations - add renderType to dateTime fields (#277) (Commit 044f768 by Henri Nathanson)
|
||||
2020-05-05 [FIX][FOLLOWUP] Remove css-class from single view link in bubble (Commit 13edac8 by Clemens Riccabona)
|
||||
2020-05-05 [TASK] Include link to single view in maps bubble if singlePid is set; Thanks to @heikohaensge with PR #235 (Commit 4eda8e0 by Clemens Riccabona)
|
||||
2020-05-04 [TASK] Keep extbase prefix in plugin title and description label identifier to avoid a breaking change (Commit 3036718 by Patrick Lenk)
|
||||
2020-05-04 [TASK] Merge with upstream (Commit ad62aaf by Clemens Riccabona)
|
||||
2020-04-21 [BUGFIX] Fix composer v2.0 compatibility (Commit fbc2157 by Benni Mack)
|
||||
|
||||
This list has been created by using `git log $(git describe --tags --abbrev=0)..HEAD --abbrev-commit --pretty='%ad %s (Commit %h by %an)' --date=short`.
|
||||
@@ -0,0 +1,30 @@
|
||||
5.2.1 - 24th February 2021
|
||||
==========================
|
||||
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
.. only:: html
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
:depth: 3
|
||||
|
||||
Important changes
|
||||
-----------------
|
||||
|
||||
All Changes
|
||||
-----------
|
||||
This is a list of all changes in this release: ::
|
||||
|
||||
2021-02-09 [TASK] Remove unnecessary limit (#338) (Commit 21b69d3 by nebrot)
|
||||
2021-01-27 [BUGFIX] Remove trailing comma to keep compatibility with PHP 7.2 (#336) (Commit 1f45e44 by Xavier Perseguers)
|
||||
2021-01-22 [TASK] Use new plugin configuration (Commit 0ca38f6 by Georg Ringer)
|
||||
2021-01-22 [FEATURE] Clean phone number for tel links (Commit 8c1ea14 by Stefan Frömken)
|
||||
2020-12-22 [DOC] Fix typo in readme (Commit 458e7b9 by Dirk Jüttner)
|
||||
2020-10-08 [BUGFIX] Change check if TS setting should be overriden via flexforms (#310) (Commit 8a4c088 by Georg Ringer)
|
||||
2020-10-07 [TASK] Add return value for command #309 (Commit 2c90a91 by Georg Ringer)
|
||||
2020-10-07 [TASK] Add eval trim to email address (Commit ddc963c by bucheggerOnline)
|
||||
2020-10-06 [TASK] Improve CGL (Commit bec7497 by Georg Ringer)
|
||||
|
||||
|
||||
This list has been created by using `git log $(git describe --tags --abbrev=0)..HEAD --abbrev-commit --pretty='%ad %s (Commit %h by %an)' --date=short`.
|
||||
@@ -0,0 +1,52 @@
|
||||
5.3.0 - 24th February 2021
|
||||
==========================
|
||||
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
.. only:: html
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
:depth: 3
|
||||
|
||||
Important changes
|
||||
-----------------
|
||||
|
||||
Supported & Required TYPO3 versions
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
- **TYPO3 9**: This release is the last planned one which will support TYPO3 9.
|
||||
- **TYPO3 10**: If the new pagination API is used, TYPO3 10.4.13 is required
|
||||
- **TYPO3 11**: This is the 1st version which supports 11.0
|
||||
|
||||
Support of Pagination API
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Since TYPO3 10 a new pagination API has been introduced as the pagination via widgets has been marked as deprecated.
|
||||
Read more about it at https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/Pagination/Index.html.
|
||||
|
||||
To simplify updates and getting you used to this API, this release includes the new paginiation API as well.
|
||||
|
||||
.. note::
|
||||
|
||||
It needs to be enabled in the extension settings globally and is disabled by default.
|
||||
|
||||
Please be aware that the routing configuration needs to be adopted as the name of the variable changed from `[widget_0][currentPage]=2` to `[currentPage]=2`!
|
||||
|
||||
All Changes
|
||||
-----------
|
||||
This is a list of all changes in this release: ::
|
||||
|
||||
2021-07-28 [TASK] Exclude Domain/Model from autowiring (Commit 0e4b9ef by Georg Ringer)
|
||||
2021-07-26 Compatibility with Apache 2.4.x (#355) (Commit 1c43d12 by Stefan Neufeind)
|
||||
2021-07-20 [BUGFIX] Set proper size of flexform settings.groups (#349) (Commit 7c8667d by Patrick Lenk)
|
||||
2021-05-18 [TASK] Remove @entity from model (Commit 63928da by Georg Ringer)
|
||||
2021-04-10 [BUGFIX] Use the correct ImageReference in partials (#347) (Commit f4b5786 by ayacoo)
|
||||
2021-03-25 [TASK] Remove show_thumbs in Flexform (#344) (Commit a174ef0 by Sybille Peters)
|
||||
2021-03-23 Merge pull request #342 from tantebootsy/master (Commit 5a4f592 by Benni Mack)
|
||||
2021-03-23 change boolean to bool (Commit 62e9105 by Michael Bakonyi)
|
||||
2021-03-23 add hidden to model (Commit 2433b32 by Michael Bakonyi)
|
||||
2021-02-24 [TASK] Raise version to 5.3.0 (Commit d017991 by Georg Ringer)
|
||||
2021-02-24 [FEATURE] Support Pagination API of 10+ (Commit 24de820 by Georg Ringer)
|
||||
|
||||
|
||||
|
||||
This list has been created by using `git log $(git describe --tags --abbrev=0)..HEAD --abbrev-commit --pretty='%ad %s (Commit %h by %an)' --date=short`.
|
||||
@@ -0,0 +1,132 @@
|
||||
6.0.0 - 3th February 2022
|
||||
=========================
|
||||
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
.. only:: html
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
:depth: 3
|
||||
|
||||
|
||||
Important changes
|
||||
-----------------
|
||||
|
||||
The following changes could be breaking for you.
|
||||
|
||||
Handling of field `name`
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
The field `name` is **not** filled automatically anymore by the first and last name and the field will be remove with one of the next versions.
|
||||
|
||||
Code cleanup
|
||||
^^^^^^^^^^^^
|
||||
The following code cleanups have been added:
|
||||
|
||||
- Removal of translated XLF files: Download the translations from the translation server via Install Tool.
|
||||
- Strict types and type hints have been added
|
||||
|
||||
Features
|
||||
--------
|
||||
|
||||
Improved record title in backend
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
It is possible to change the used fields for the title of the record by TsConfig.
|
||||
This is nice if using the extension for various purposes, e.g. locations and newsletter subscriptions.
|
||||
|
||||
.. code-block:: typoscript
|
||||
|
||||
# Page TsConfig
|
||||
tt_address.label = name;last_name,first_name;email
|
||||
|
||||
Each label group is divided by `;` and each group can hold a list of field names.
|
||||
|
||||
1. In the given example, the value of the field `name` is shown if filled.
|
||||
2. If the field is empty, the values of the fields `last_name` and `first_name` are shown.
|
||||
3. If this combination is still empty, the email address is shown
|
||||
|
||||
|
||||
New properties & getters
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
- The field `titleSuffix` has been added
|
||||
- The getter `getFirstCategory` has been added to make it easier in fluid to retrive the first category with `{address.firstCategory}`.
|
||||
|
||||
New ViewHelpers
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
The following ViewHelpers have been added:
|
||||
|
||||
- :fluid:`<address:clean.domain />`
|
||||
- :fluid:`<address:clean.phoneNumber />`
|
||||
|
||||
Those trigger the same cleaning as :fluid:`{address.cleanedPhoneNumber}` and :fluid:`{address.wwwSimplified}`.
|
||||
|
||||
If address records are retrieved directly, e.g. by using a DataProcessor, it is possible to clean the values as in the templates.
|
||||
|
||||
All Changes
|
||||
-----------
|
||||
This is a list of all changes in this release: ::
|
||||
|
||||
2022-02-03 [DOC] Provide some more badges in the main readme (Commit f957599 by Georg Ringer)
|
||||
2022-02-03 Apply fixes from StyleCI (#397) (Commit f539473 by Georg Ringer)
|
||||
2022-02-03 [BUGFIX] Remove unused argument from QueryGenerator (Commit c9e1431 by Georg Ringer)
|
||||
2022-01-31 Apply fixes from StyleCI (#395) (Commit 17e1a1b by Georg Ringer)
|
||||
2022-01-31 [TASK] Improve fallback for titles (Commit 2912099 by Georg Ringer)
|
||||
2022-01-15 [FEATURE] Dynamic label configuration (Commit ff78ce9 by Georg Ringer)
|
||||
2022-01-15 [FEATURE] Extract property modification to utility (#391) (Commit cedcd55 by Georg Ringer)
|
||||
2022-01-12 [FEATURE] Provide proper metatag description (Commit 544df31 by Georg Ringer)
|
||||
2022-01-12 [FEATURE] Provide suffix title field (Commit cdc0988 by Georg Ringer)
|
||||
2022-01-12 [BUGFIX] Provide more fields at ctrl|label_alt (Commit d0ca8ab by Georg Ringer)
|
||||
2022-01-12 [FEATURE] implement firstCategory property (#383) (Commit 4341d2e by Henrik Ziegenhain)
|
||||
2022-01-12 [TASK] Check for TYPO3_MODE for icon registry (Commit 2df50d0 by Georg Ringer)
|
||||
2021-11-23 [DOCS] Add explanation and example for Routing (#380) (Commit 47496ad by Lina Wolf)
|
||||
2021-11-02 [BUGFIX] Ignore newPagination setting for TYPO3 11 (#378) (Commit 288ae5f by Georg Ringer)
|
||||
2021-11-02 [TASK] Avoid usage of ObjectManager in AddressRepository (Commit a058e83 by Georg Ringer)
|
||||
2021-11-02 [TASK] Avoid usage of ObjectManager in AddressRepository (Commit e980c05 by Georg Ringer)
|
||||
2021-11-02 [TASK] Avoid usage of ObjectManager in test (Commit 3b1e09a by Georg Ringer)
|
||||
2021-11-02 [TASK] Use correct cache name in ext_localconf (Commit 88e3728 by Georg Ringer)
|
||||
2021-11-02 [TASK] Use proper cache name (Commit e1efc7d by Georg Ringer)
|
||||
2021-11-02 [TASK] Use TCA type language in TYPO3 11 (Commit 8ced7e5 by Georg Ringer)
|
||||
2021-10-21 [DOC] Followup (Commit 6768741 by Georg Ringer)
|
||||
2021-10-21 [DOC] Fix example of extending model (Commit cb39e4c by Georg Ringer)
|
||||
2021-10-12 [DOC] Start changelog of 6.0.0 (Commit 87acc2c by Georg Ringer)
|
||||
2021-10-12 [TASK] Use own partial for f:widget (Commit d75fc88 by Georg Ringer)
|
||||
2021-10-12 [BUGFIX] Address:getImage might return null (Commit c9c8fe4 by Georg Ringer)
|
||||
2021-10-12 [TASK] Allow TYPO3 11.5 (Commit 3d89fac by Georg Ringer)
|
||||
2021-09-29 [TASK] Add PHP8 for tests (#374) (Commit bf1545d by Georg Ringer)
|
||||
2021-09-15 [TASK] Add strict types (#372) (Commit d1b5a06 by Georg Ringer)
|
||||
2021-09-15 [TASK] Enhance List.xml Flexform (#371) (Commit c3a4e45 by Max Amann)
|
||||
2021-09-15 [BUGFIX] Check array keys before accessing those (Commit 2370e64 by Georg Ringer)
|
||||
2021-09-14 [BUGFIX] Check proper cache configuration (Commit f667b1b by Georg Ringer)
|
||||
2021-09-12 [TASK] Drop outdated plugin registration (Commit f6d895c by Georg Ringer)
|
||||
2021-09-12 [TASK] Use prophecy traits (#369) (Commit 6cf691e by Georg Ringer)
|
||||
2021-09-12 [TASK] Use own QueryGenerator (#367) (Commit 7c98cf1 by Georg Ringer)
|
||||
2021-09-12 [TASK] Change ubuntu version for tests (Commit 3ac6dd0 by Georg Ringer)
|
||||
2021-09-01 [TASK] Change sql index name to avoid a name conflict (#361) (Commit a34c2e2 by ayacoo)
|
||||
2021-08-09 [BUGFIX] Typecast to string for page id list (Commit 403750f by Georg Ringer)
|
||||
2021-08-09 [BUGFIX] Typecast for itemsPerPage (Commit 2e56d65 by Georg Ringer)
|
||||
2021-07-28 [BUGFIX] Make table key uf8mb4 compatible (#352) (Commit 3782d92 by Marc Bastian Heinrichs)
|
||||
2021-07-28 [TASK] Support of 10-11 (Commit 3d105a5 by Georg Ringer)
|
||||
2021-01-19 [TASK] Run tests on github (Commit bbfd685 by Georg Ringer)
|
||||
2021-01-19 [BUGFIX] Fix failing tests (Commit 553ff4b by Georg Ringer)
|
||||
2021-01-19 Apply fixes from StyleCI (#327) (Commit 98f99a3 by Georg Ringer)
|
||||
2021-01-19 [DOC] Update version matrix (Commit f75eb27 by Georg Ringer)
|
||||
2021-01-19 [!!!][TASK] Make all classes strict (Commit 6165c17 by Georg Ringer)
|
||||
2021-01-19 [TASK] Simplfy ext_tables.sql (Commit 0c65d8a by Georg Ringer)
|
||||
2021-01-19 [BUGFIX] Update test to use https (Commit 53ab13f by Georg Ringer)
|
||||
2021-01-19 [TASK] Remove .travis.yml (Commit b4134a9 by Georg Ringer)
|
||||
2021-01-19 [TASK] Cleanup tca (Commit c93cf54 by Georg Ringer)
|
||||
2021-01-19 [TASK] Fix nitpickings of phpstan (Commit 7cd7f94 by Georg Ringer)
|
||||
2021-01-19 [TASK] Remove label check from TCA (Commit 7c995d5 by Georg Ringer)
|
||||
2021-01-19 [TASK] Raise minimum typo3 version (Commit 9c419ca by Georg Ringer)
|
||||
2021-01-19 [TASK] Drop mapping in typoscript (Commit e02d01f by Georg Ringer)
|
||||
2021-01-19 [!!!][TASK] Remove backwards compat name field (Commit b3c8ffc by Georg Ringer)
|
||||
2021-01-19 [!!!][TASK] Remove localized xlf files (Commit 01eb699 by Georg Ringer)
|
||||
|
||||
|
||||
This list has been created by using:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
git log $(git describe --tags --abbrev=0)..HEAD --abbrev-commit --pretty='%ad %s (Commit %h by %an)' --date=short
|
||||
@@ -0,0 +1,28 @@
|
||||
6.0.1 - 18th Match 2022
|
||||
=======================
|
||||
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
.. only:: html
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
:depth: 3
|
||||
|
||||
|
||||
All Changes
|
||||
-----------
|
||||
This is a list of all changes in this release: ::
|
||||
|
||||
2022-03-18 [FEATURE] Allow sortBy by override (#410) (Commit 1a149ca by Georg Ringer)
|
||||
2022-03-16 [BUGFIX] Fix notice in AddressController (Commit 7785757 by Georg Ringer)
|
||||
2022-03-15 [DOCS] Update docs (#407) (Commit e451d43 by Alexander Nitsche)
|
||||
2022-03-14 [DOCS] Fix rendering errors (#408) (Commit 3fc8b44 by Lina Wolf)
|
||||
2022-03-10 [DOCS] Provide LinkHandler configuration (#405) (Commit bad89ad by Lina Wolf)
|
||||
2022-02-22 [FEATURE] Information on updating from v5.x to 6.0 (#402) (Commit e25a685 by Lina Wolf)
|
||||
|
||||
This list has been created by using:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
git log $(git describe --tags --abbrev=0)..HEAD --abbrev-commit --pretty='%ad %s (Commit %h by %an)' --date=short
|
||||
@@ -0,0 +1,75 @@
|
||||
7.0.0 - 7th October 2022
|
||||
========================
|
||||
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
.. only:: html
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
:depth: 3
|
||||
|
||||
|
||||
Important changes
|
||||
-----------------
|
||||
|
||||
The following changes could be breaking for you.
|
||||
|
||||
Support of TYPO3 12
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
12.0 has been released on 4th of October 2022. Read more about it at https://typo3.org/article/typo3-v120-release-your-power!
|
||||
No breaking changes are planned anymore which makes it possible for extensions to start to be compatible with the next awesome TYPO3 version.
|
||||
|
||||
.. important::
|
||||
|
||||
Support of TYPO3 11 will be kept. Currently PHP 7.4 is still supported by EXT:tt_address and *currently* there are no plans to drop that but this might change in the future. Please update to PHP 8.x!
|
||||
|
||||
Drop support of TYPO3 10
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
With the release of version 7, the support of TYPO3 10 has been stopped.
|
||||
tt_address is kind of feature complete and without known bugs, therefore no further 6.x releases are planned.
|
||||
|
||||
Removal of automatic redirect in detail view
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Previously a redirect has been triggered in the detail view if no record has been found.
|
||||
This redirect has been removed.
|
||||
|
||||
All Changes
|
||||
-----------
|
||||
This is a list of all changes in this release: ::
|
||||
|
||||
2022-10-07 [TASK] Use correct psr4 in ext_emconf (Commit 98d4565 by Georg Ringer)
|
||||
2022-10-07 Apply fixes from StyleCI (#438) (Commit a0e4028 by Georg Ringer)
|
||||
2022-10-07 [BUGFIX] Fix undefined notice for new records (Commit 905f291 by Georg Ringer)
|
||||
2022-10-07 [TASK] Replace PageLayoutViewHook with PreviewRenderer (Commit c2d0ae1 by Georg Ringer)
|
||||
2022-10-07 [BUGFIX] Use correct DB call (Commit 009608c by Georg Ringer)
|
||||
2022-10-07 Apply fixes from StyleCI (#436) (Commit 9a7e5b8 by Georg Ringer)
|
||||
2022-10-07 [BUGFIX] Check t3 version for js module (Commit d1a81ef by Georg Ringer)
|
||||
2022-10-07 add composer tf bridge (Commit d95e5de by Georg Ringer)
|
||||
2022-10-07 add composer tf bridge (Commit d928d84 by Georg Ringer)
|
||||
2022-10-07 Revert "[TASK] Add php 8.2" (Commit f730950 by Georg Ringer)
|
||||
2022-10-07 [TASK] Add php 8.2 (Commit e1057b3 by Georg Ringer)
|
||||
2022-10-07 [BUGFIX] Use array_values for unpacking (Commit ced151d by Georg Ringer)
|
||||
2022-10-07 followup (Commit 7e77fb8 by Georg Ringer)
|
||||
2022-10-07 [TASK] Use latest TF (Commit 3e646fd by Georg Ringer)
|
||||
2022-10-07 [TASK] Migrate tests (Commit 64fb44a by Georg Ringer)
|
||||
2022-10-07 [BUGFIX] Fix failing tests (Commit 6dc4ecb by Georg Ringer)
|
||||
2022-10-06 [TASK] Allow composer plugins (Commit b6670f3 by Georg Ringer)
|
||||
2022-10-06 [TASK] Migrate 1st run (Commit bfa1f72 by Georg Ringer)
|
||||
2022-10-06 [BUGFIX] Register command in services.yaml (Commit 154009a by Georg Ringer)
|
||||
2022-08-22 [BUGFIX] Fix warning in pagelayoutview (Commit be3e18b by Georg Ringer)
|
||||
2022-07-21 [TASK] int cast for pid value (#419) (Commit a52ef48 by ayacoo)
|
||||
2022-06-28 Apply fixes from StyleCI (#418) (Commit a7c94cc by Georg Ringer)
|
||||
2022-06-28 [!!!][TASK] Remove redirect in detail view (Commit 08aca68 by Georg Ringer)
|
||||
2022-06-02 [FEATURE] Provide getter in model for the language id (Commit 351a9dc by Georg Ringer)
|
||||
2022-05-10 [FEATURE] Added storage page check for showAction (#415) (Commit 1543d9f by Torben Hansen)
|
||||
2022-04-11 [TASK] Add TER + documentation + repository to composer.json (#413) (Commit 040c0b4 by Alexander Nitsche)
|
||||
2022-04-05 [TASK] Align with new TYPO3 documentation standards (#411) (Commit 8c53536 by Alexander Nitsche)
|
||||
|
||||
|
||||
This list has been created by using:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
git log $(git describe --tags --abbrev=0)..HEAD --abbrev-commit --pretty='%ad %s (Commit %h by %an)' --date=short
|
||||
@@ -0,0 +1,38 @@
|
||||
7.1.0 - 16th February 2023
|
||||
==========================
|
||||
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
.. only:: html
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
:depth: 3
|
||||
|
||||
|
||||
Important changes
|
||||
-----------------
|
||||
No important changes happend, just a bugfix release
|
||||
|
||||
All Changes
|
||||
-----------
|
||||
This is a list of all changes in this release: ::
|
||||
|
||||
2023-01-19 [BUGFIX] Allow set sorting via TS (Commit 9cfc51a by Georg Ringer)
|
||||
2023-01-19 Revert "[TASK] Enhance List.xml Flexform (#371)" (Commit 94a8e1f by Georg Ringer)
|
||||
2023-01-12 [FEATURE] Support EXT:reactions (Commit cbabd36 by Georg Ringer)
|
||||
2023-01-04 [BUGFIX] Set localization mode for gender to exclude (#449) (Commit c305640 by Peter Neumann)
|
||||
2022-12-21 PHP Warning: Undefined array key "singleRecords" in AddressController.php line 165 (#447) (Commit 60360a8 by in-session)
|
||||
2022-11-10 [BUGFIX] Prevent undefined array key "groups" (#446) (Commit ffb2501 by Peter Neumann)
|
||||
2022-10-13 [TASK] Delete Commands.php in favor of Services.yaml (#441) (Commit 08d085c by Christoph Lehmann)
|
||||
2022-10-13 [BUGFIX] Title values to new labels (#442) (Commit e9c362a by C. Riccabona)
|
||||
2022-10-08 [DOC] Enrich routing example (Commit e8cacb4 by Georg Ringer)
|
||||
2022-10-08 [TASK] Remove unused pagination switch (#440) (Commit 0ed9b29 by Georg Ringer)
|
||||
2022-10-08 [DOC] Fix routing example (Commit a12422c by Georg Ringer)
|
||||
|
||||
|
||||
This list has been created by using:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
git log $(git describe --tags --abbrev=0)..HEAD --abbrev-commit --pretty='%ad %s (Commit %h by %an)' --date=short
|
||||
@@ -0,0 +1,54 @@
|
||||
8.0.0 - 7th June 2023
|
||||
=====================
|
||||
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
.. only:: html
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
:depth: 3
|
||||
|
||||
|
||||
♥ Thanks to StudioMitte (https://www.studiomitte.com/) for sponsoring this release!
|
||||
|
||||
Important changes
|
||||
-----------------
|
||||
|
||||
Better CSP support
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
CSP (Content Security Policy) can be used to prevent loading inline styles.
|
||||
Therefore some styles have been extracted into a separate CSS file.
|
||||
|
||||
Additionally the CSP configuration for TYPO3 v12 has been extended to allow calls to OpenStreetMap!
|
||||
|
||||
Database changes
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
- 2 new fields have been added: Instagram + TikTok
|
||||
- Increased size of the fields `building` + `room`
|
||||
|
||||
All Changes
|
||||
-----------
|
||||
This is a list of all changes in this release: ::
|
||||
|
||||
2023-05-26 Adding Instagram + TikTok to social details (#477) (Commit df17cea by bucheggerOnline)
|
||||
2023-05-23 [TASK] Configure CSP for FE (Commit 6fa22cf by Georg Ringer)
|
||||
2023-05-23 [!!!][TASK] Move inline styles to external file (Commit 1399cd5 by Georg Ringer)
|
||||
2023-05-22 [TASK] Increase field size (Commit e7086af by Georg Ringer)
|
||||
2023-05-22 [TASK] Increase field size (Commit 76ede1e by Georg Ringer)
|
||||
2023-05-15 [TASK] Add CSP policy (Commit 008fcc5 by Georg Ringer)
|
||||
2023-05-15 [TASK] Migrate custom form field evaluation (returnFieldJS) (#468) (Commit 71045b7 by Oliver Hader)
|
||||
2023-05-14 [BUGFIX] Fix notice with PHP 8 (Commit 1789c52 by Georg Ringer)
|
||||
2023-05-04 Mark as TYPO3 12.4 compatible (#465) (Commit 80cb029 by Alexander Grein)
|
||||
2023-04-19 [DOC] Fix typo in routing example (Commit 5600f0c by Georg Ringer)
|
||||
2023-03-28 [TASK] Followup: Change format for pages module field (Commit b0f8c2e by Georg Ringer)
|
||||
2023-03-28 [TASK] Support new TCA format for selects (Commit 32a3478 by Georg Ringer)
|
||||
2023-03-13 [BUGFIX] Declare (#453) (Commit 9a24aab by Tim Dreier)
|
||||
|
||||
|
||||
This list has been created by using:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
git log $(git describe --tags --abbrev=0)..HEAD --abbrev-commit --pretty='%ad %s (Commit %h by %an)' --date=short
|
||||
@@ -0,0 +1,24 @@
|
||||
8.0.1 - 8th June 2023
|
||||
=====================
|
||||
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
.. only:: html
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
:depth: 3
|
||||
|
||||
|
||||
All Changes
|
||||
-----------
|
||||
This is a list of all changes in this release: ::
|
||||
|
||||
2023-06-07 [BUGFIX] Make TelephoneEvaluation work in v11 #484 (Commit b06bfad by Georg Ringer)
|
||||
|
||||
|
||||
This list has been created by using:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
git log $(git describe --tags --abbrev=0)..HEAD --abbrev-commit --pretty='%ad %s (Commit %h by %an)' --date=short
|
||||
@@ -0,0 +1,29 @@
|
||||
8.0.2 - 22th December 2023
|
||||
==========================
|
||||
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
.. only:: html
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
:depth: 3
|
||||
|
||||
|
||||
All Changes
|
||||
-----------
|
||||
This is a list of all changes in this release: ::
|
||||
|
||||
2023-10-10 Update LocationMapWizard.php (#501) (Commit f9ac64a by Markus Söth)
|
||||
2023-08-29 [FIX] adapt nominatim API URL (#498) (Commit b96f2c4 by Ingo Fabbri)
|
||||
2023-08-28 Fix check for sortBy field (#451) (Commit ac3a41d by Uwe)
|
||||
2023-08-01 [DOC] Fix example using in other extension #495 (Commit 8f77d2e by Georg Ringer)
|
||||
2023-07-27 [TASK] Improve leavlet JS (Commit acf43a2 by Georg Ringer)
|
||||
2023-06-15 [BUGFIX] Load full row for label #485 (Commit b27e170 by Georg Ringer)
|
||||
|
||||
|
||||
This list has been created by using:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
git log $(git describe --tags --abbrev=0)..HEAD --abbrev-commit --pretty='%ad %s (Commit %h by %an)' --date=short
|
||||
@@ -0,0 +1,26 @@
|
||||
8.0.3 - 12th February 2024
|
||||
==========================
|
||||
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
.. only:: html
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
:depth: 3
|
||||
|
||||
|
||||
All Changes
|
||||
-----------
|
||||
This is a list of all changes in this release: ::
|
||||
|
||||
2024-02-12 [TASK] Explicitly require symfony/console (#517) (Commit b206771 by Mathias Brodala)
|
||||
2024-01-25 Prevent Fatal Error in TYPO3 12.4 (#516) (Commit 95e1d6d by Lina Wolf)
|
||||
2024-01-25 Update ext_conf_template.txt (#514) (Commit 9d326a7 by Uwe)
|
||||
2024-01-08 [BUGFIX] Cannot add new address record in TYPO3 v12 PHP 8.2 (#512) (Commit 6dc5661 by Luca Braun)
|
||||
|
||||
This list has been created by using:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
git log $(git describe --tags --abbrev=0)..HEAD --abbrev-commit --pretty='%ad %s (Commit %h by %an)' --date=short
|
||||
@@ -0,0 +1,28 @@
|
||||
8.1.0 - 1st May 2024
|
||||
====================
|
||||
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
.. only:: html
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
:depth: 3
|
||||
|
||||
|
||||
All Changes
|
||||
-----------
|
||||
This is a list of all changes in this release: ::
|
||||
|
||||
2024-05-01 [FEATURE] Make insert record available #508 (Commit c596fa3 by Georg Ringer)
|
||||
2024-05-01 [BUGFIX] Add workspace overlay in label hook #525 (Commit f8b7a93 by Georg Ringer)
|
||||
2024-05-01 [TASK] Drop unused setting backwardsCompatFormat #510 (Commit 5bf71b5 by Georg Ringer)
|
||||
2024-05-01 [BUGFIX] Check record in Label hook #513 (Commit 95d127a by Georg Ringer)
|
||||
2024-03-20 [TASK] Use Connection instead of PDO (#520) (Commit 0ae85fb by Eric Harrer)
|
||||
2024-03-04 [DOCS] Switch to PHP-based documentation rendering (#519) (Commit 197c2fc by Lina Wolf)
|
||||
|
||||
This list has been created by using:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
git log $(git describe --tags --abbrev=0)..HEAD --abbrev-commit --pretty='%ad %s (Commit %h by %an)' --date=short
|
||||
@@ -0,0 +1,25 @@
|
||||
8.1.1 - 10th July 2024
|
||||
======================
|
||||
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
.. only:: html
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
:depth: 3
|
||||
|
||||
|
||||
All Changes
|
||||
-----------
|
||||
This is a list of all changes in this release: ::
|
||||
|
||||
2024-07-09 fix: make preview renderer compatible with typo3 12.4.17 (#554) (Commit e909317 by Maik Schneider)
|
||||
2024-05-06 [BUGFIX] Fix notice (Commit 06edeb5 by Georg Ringer)
|
||||
|
||||
|
||||
This list has been created by using:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
git log $(git describe --tags --abbrev=0)..HEAD --abbrev-commit --pretty='%ad %s (Commit %h by %an)' --date=short
|
||||
@@ -0,0 +1,15 @@
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
|
||||
.. _administration:
|
||||
|
||||
Administration
|
||||
==============
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:titlesonly:
|
||||
|
||||
Installation/Index
|
||||
Updating/Index
|
||||
Changelog/Index
|
||||
@@ -0,0 +1,70 @@
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
|
||||
.. _users-manual-installation:
|
||||
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
+----------+-----+-----+-----+-----+-----+-----+
|
||||
| | 8.x | 7.x | 6.x | 5.x | 4.x | 3.x |
|
||||
+----------+-----+-----+-----+-----+-----+-----+
|
||||
| TYPO3 12 | yes | yes | no | no | no | no |
|
||||
+----------+-----+-----+-----+-----+-----+-----+
|
||||
| TYPO3 11 | yes | yes | yes | no | no | no |
|
||||
+----------+-----+-----+-----+-----+-----+-----+
|
||||
| TYPO3 10 | no | no | yes | yes | no | no |
|
||||
+----------+-----+-----+-----+-----+-----+-----+
|
||||
| TYPO3 9 | no | no | no | yes | yes | no |
|
||||
+----------+-----+-----+-----+-----+-----+-----+
|
||||
| TYPO3 8 | no | no | no | no | yes | yes |
|
||||
+----------+-----+-----+-----+-----+-----+-----+
|
||||
| TYPO3 7 | no | no | no | no | no | yes |
|
||||
+----------+-----+-----+-----+-----+-----+-----+
|
||||
|
||||
.. important::
|
||||
|
||||
Active support is only provided for the latest major version.
|
||||
|
||||
The extension needs to be installed as any other extension of TYPO3 CMS:
|
||||
|
||||
#. **Get it from the Extension Manager:** Press the “Retrieve/Update”
|
||||
button and search for the extension key `tt_address` and import the
|
||||
extension from the repository.
|
||||
|
||||
#. **Get it from typo3.org:** You can always get current version from
|
||||
the `TER`_ by downloading either the t3x or zip version. Upload
|
||||
the file afterwards in the Extension Manager.
|
||||
|
||||
#. **Use composer**: Run
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
composer require friendsoftypo3/tt-address
|
||||
|
||||
.. _TER: https://extensions.typo3.org/extension/tt_address
|
||||
|
||||
The Extension Manager offers some basic configuration which is explained
|
||||
:ref:`here <configuration-extension-configuration>`.
|
||||
|
||||
Latest version from git
|
||||
-----------------------
|
||||
You can get the latest version from git by using the git command:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
git clone git@github.com:FriendsOfTYPO3/tt_address.git
|
||||
|
||||
Preparation: Include static TypoScript
|
||||
--------------------------------------
|
||||
|
||||
The extension ships some TypoScript code which needs to be included.
|
||||
|
||||
#. Switch to the root page of your site.
|
||||
|
||||
#. Switch to the **Template module** and select *Info/Modify*.
|
||||
|
||||
#. Press the link **Edit the whole template record** and switch to the tab *Includes*.
|
||||
|
||||
#. Select **Addresses (Extbase/Fluid)** at the field *Include static (from extensions):*
|
||||
@@ -0,0 +1,65 @@
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
.. _administration-updating:
|
||||
|
||||
========
|
||||
Updating
|
||||
========
|
||||
|
||||
In general after every update you should update the database scheme in
|
||||
:guilabel:`Admin tools > Maintenance > Analyze Database` and flush all caches.
|
||||
|
||||
Updating from 5.x to 6.0.0
|
||||
--------------------------
|
||||
|
||||
The field `name` is **not** filled automatically anymore by the first and last
|
||||
name and the field will be remove with one of the next versions. If your
|
||||
templates or third party extension depend on this field to be filled you can
|
||||
activate the legacy behaviour in
|
||||
:guilabel:`Admin tools > Settings > Extension Configuration` by checking
|
||||
:guilabel:`Store backwards compatibility name in name field`.
|
||||
|
||||
Translation files for languages other then English are not included directly
|
||||
in the extension anymore. You can get them from the translation server at
|
||||
:guilabel:`Admin tools > Maintenance > Manage Languages`.
|
||||
|
||||
Updating from 4.x to 5.0.0
|
||||
--------------------------
|
||||
|
||||
.. warning::
|
||||
|
||||
The upgrade wizard to migrate from pibase to extbase plugins have been removed. If you need those, please install version 4.x first and upgrade afterwards.
|
||||
|
||||
With the version 5.0.0 the TYPO3 versions 9 and 10 are supported which also means that the support for version 8 has been dropped.
|
||||
|
||||
|
||||
Updating from 3.x to 4.0.0
|
||||
--------------------------
|
||||
With the version 4.0.0 the code base changed a lot to support TYPO3 8.7 LTS and 9.5 LTS.
|
||||
|
||||
The most important changes are:
|
||||
|
||||
- Changing the vendor name from `TYPO3` to `FriendsOfTYPO3`
|
||||
- Usage of Extbase & Fluid. The previous plugin is deprecated and will be removed with version 5.0.0
|
||||
- Changing the location of TypoScript files of old plugin
|
||||
|
||||
An upgrade wizard in the Install Tool makes it possible to upgrade the TypoScript usages.
|
||||
It migrates `EXT:tt_address/static/pi1` to `EXT:tt_address/Configuration/TypoScript/LegacyPlugin`.
|
||||
|
||||
.. warning::
|
||||
|
||||
The upgrade wizard does not update any TS inclusion done in your site package.
|
||||
|
||||
Another upgrade wizard migrates old piBase plugins to extbase plugins. The `Template` option is converted to
|
||||
`Display mode`. So for example your `Template` is `my_template.html`, then
|
||||
|
||||
- Add TSconfig `TCEFORM.tt_content.pi_flexform.ttaddress_listview.sDISPLAY.settings\\.displayMode.addItems.my_template = My Template`
|
||||
- Add a section named `displayMode_my_template` in your custom `List.html` fluid template
|
||||
|
||||
After execution (via cli) you get a list of custom templates you used in your installation.
|
||||
|
||||
Updating from 2.x to 4.0.0
|
||||
--------------------------
|
||||
|
||||
It is **not** possible to upgrade from version 2.x to 4.0 directly! Update first to the latest 3.x version and use
|
||||
the upgrade wizards to migrate from custom category records to sys_category records and to FAL elements.
|
||||
@@ -0,0 +1,28 @@
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
|
||||
.. _configuration-extension-configuration:
|
||||
|
||||
Global extension configuration
|
||||
==============================
|
||||
|
||||
After the installation has been completed, some global configuration can be defined.
|
||||
|
||||
If you are using TYPO3 8.7, this configuration can be found in the Extension Manager.
|
||||
With version 9.5 this has been moved to the Install Tool.
|
||||
|
||||
Settings
|
||||
--------
|
||||
|
||||
The following settings are available:
|
||||
|
||||
====================================== ========== ============================================================= =========================
|
||||
Property: Data type: Description: Default:
|
||||
====================================== ========== ============================================================= =========================
|
||||
storeBackwardsCompatName boolean If set, the field `name` is populated with the values of the 1
|
||||
fields `first_name`, `middle_name` and `last_name`.
|
||||
-------------------------------------- ---------- ------------------------------------------------------------- -------------------------
|
||||
readOnlyNameField boolean If set, the name field is set to read only which makes 1
|
||||
absolutely sense if the value of the field is populated
|
||||
automatically.
|
||||
====================================== ========== ============================================================= =========================
|
||||
@@ -0,0 +1,22 @@
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
|
||||
.. _configuration:
|
||||
|
||||
Configuration
|
||||
=============
|
||||
|
||||
When starting to configure the extension you should create a separate TS extension template for it
|
||||
where you do all the configuration for this extension. That extension template can then get included
|
||||
in the root template. In the extension template add the static TS configuration, otherwise it wont
|
||||
work!
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:titlesonly:
|
||||
|
||||
ExtensionSettings/Index
|
||||
TypoScript/Index
|
||||
TsConfig/Index
|
||||
Seo/Index
|
||||
Routing/Index
|
||||
@@ -0,0 +1,100 @@
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
.. _routing:
|
||||
.. _configuration-extension-routing:
|
||||
|
||||
===========================
|
||||
Use Routing to rewrite URLs
|
||||
===========================
|
||||
|
||||
This section will show you how you can rewrite the URLs for tt\_address using
|
||||
**Routing Enhancers and Aspects**. TYPO3 Explained has a chapter
|
||||
:ref:`Introduction to routing <t3coreapi:routing-introduction>` that you can read
|
||||
if you are not familiar with the concept yet. You will no
|
||||
longer need third party extensions like RealURL or CoolUri to rewrite and
|
||||
beautify your URLs.
|
||||
|
||||
.. _how_to_rewrite_urls:
|
||||
|
||||
How to rewrite URLs with address parameters
|
||||
============================================
|
||||
|
||||
On setting up your page you should already have created a **site configuration**.
|
||||
You can do this in the backend module :guilabel:`Site Managements > Sites`.
|
||||
|
||||
Your site configuration will be stored in
|
||||
:file:`/config/sites/<your_identifier>/config.yaml`. The following
|
||||
configurations have to be applied to this file.
|
||||
|
||||
Any URL parameters can be rewritten with the Routing Enhancers and Aspects.
|
||||
These are added manually in the :file:`config.yaml`:
|
||||
|
||||
#. Add a section :yaml:`routeEnhancers`, if one does not already exist.
|
||||
#. Choose an unique identifier for your Routing Enhancer. It doesn't have
|
||||
to match any extension key.
|
||||
#. :yaml:`type`: For tt\_address, the Extbase Plugin Enhancer (:yaml:`Extbase`)
|
||||
is used.
|
||||
#. :yaml:`extension`: the extension key, converted to :code:`UpperCamelCase`.
|
||||
#. :yaml:`plugin`: the plugin name of address is `ListView`, even for the detail
|
||||
page.
|
||||
#. After that you will configure individual routes and aspects depending on
|
||||
your use case.
|
||||
|
||||
.. code-block:: yaml
|
||||
:linenos:
|
||||
:caption: :file:`/config/sites/<your_identifier>/config.yaml`
|
||||
|
||||
Address:
|
||||
type: Extbase
|
||||
limitToPages:
|
||||
- 8
|
||||
- 10
|
||||
- 11
|
||||
extension: TtAddress
|
||||
plugin: ListView
|
||||
routes:
|
||||
- routePath: '/{address-title}'
|
||||
_controller: 'Address::show'
|
||||
_arguments:
|
||||
address-title: address
|
||||
- routePath: '/{page-label}-{page}'
|
||||
_controller: 'Address::list'
|
||||
_arguments:
|
||||
page: 'currentPage'
|
||||
defaultController: 'Address::list'
|
||||
aspects:
|
||||
address-title:
|
||||
type: PersistedAliasMapper
|
||||
tableName: tt_address
|
||||
routeFieldName: slug
|
||||
page:
|
||||
type: StaticRangeMapper
|
||||
start: '1'
|
||||
end: '100'
|
||||
page-label:
|
||||
type: LocaleModifier
|
||||
default: seite
|
||||
localeMap:
|
||||
- locale: 'en_.*'
|
||||
value: page
|
||||
- locale: 'it_.*'
|
||||
value: pagina
|
||||
- locale: 'fr_.*'
|
||||
value: page
|
||||
- locale: 'es_.*'
|
||||
value: pagina
|
||||
|
||||
.. tip::
|
||||
|
||||
If your routing does not work as expected, check the **indentation** of your
|
||||
configuration blocks.
|
||||
Proper indentation is crucial in YAML.
|
||||
|
||||
It is recommended to limit :yaml:`routeEnhancers` to the pages where they are needed.
|
||||
This will speed up performance for building page routes of all other pages.
|
||||
|
||||
References
|
||||
==========
|
||||
|
||||
* :ref:`TYPO3 Documentation: Routing <t3coreapi:routing-introduction>`
|
||||
* :ref:`TYPO3 Documentation: Site Handling <t3coreapi:sitehandling>`
|
||||
@@ -0,0 +1,46 @@
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
|
||||
.. _configuration-extension-seo:
|
||||
|
||||
SEO
|
||||
===
|
||||
This chapter covers all aspects regarding search engine optimization for tt_address.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:titlesonly:
|
||||
|
||||
Routing
|
||||
-------
|
||||
|
||||
Routing can be used to rewrite the URLs for tt\_address. The chapter
|
||||
:ref:`Use Routing to rewrite URLs <configuration-extension-routing>` is a good
|
||||
starting point.
|
||||
|
||||
Custom Page Title
|
||||
-----------------
|
||||
If a detail view is rendered, a custom page title provider changes the page title to a specific one provided by the extension.
|
||||
The following configuration is set by default:
|
||||
|
||||
.. code-block:: typoscript
|
||||
|
||||
plugin.tx_ttaddress.settings.seo {
|
||||
pageTitle {
|
||||
properties = title,firstName,middleName,lastName
|
||||
glue = " "
|
||||
}
|
||||
}
|
||||
|
||||
- The setting `properties` is a comma separated list of properties of the `Address` model which should be taken into account (if not empty).
|
||||
- The setting `glue` defines how the values are combined together.
|
||||
|
||||
Meta Tags
|
||||
---------
|
||||
Meta Tags are rendered by using the ViewHelper `MetaTagViewHelper`.
|
||||
.. code-block:: html
|
||||
|
||||
<!-- Example can be found in Partials/MetaTags.html
|
||||
<ttaddr:metaTag property="description">{address}</ttaddr:metaTag>
|
||||
|
||||
By default the meta tags for `description` and `og:description` are set.
|
||||
@@ -0,0 +1,31 @@
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
.. _configuration-extension-tsconfig:
|
||||
|
||||
==================
|
||||
TsConfig Reference
|
||||
==================
|
||||
|
||||
This section covers the configuration options set via Page TsConfig.
|
||||
|
||||
Modify record label in backend
|
||||
==============================
|
||||
|
||||
The label of the record is shown in the list module of the backend.
|
||||
Depending on the use case it can improve the usability to generate the label from
|
||||
different columns. If `tt_address` is used to collect email addresses,
|
||||
the email address might be the only filled field. If the records hold information
|
||||
about contacts of a company, the name should be shown.
|
||||
|
||||
By using the configuration `tt_address.label` all use cases can be covered as long
|
||||
as those are splitted into different pages. A typical example might be:
|
||||
|
||||
.. code-block:: typoscript
|
||||
|
||||
tt_address.label = name;last_name,first_name;email
|
||||
|
||||
Each label group is divided by `;` and each group can hold a list of field names.
|
||||
|
||||
1. In the given example, the value of the field `name` is shown if filled.
|
||||
2. If the field is empty, the values of the fields `last_name` and `first_name` are shown.
|
||||
3. If this combination is still empty, the email address is shown
|
||||
@@ -0,0 +1,209 @@
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
|
||||
.. _configuration-reference:
|
||||
|
||||
=========
|
||||
Reference
|
||||
=========
|
||||
|
||||
View
|
||||
====
|
||||
|
||||
.. confval:: view.templateRootPaths
|
||||
|
||||
:Path: plugin.tx_ttaddress
|
||||
:type: array
|
||||
|
||||
Defines the path where the templates are located.
|
||||
|
||||
.. code-block:: typoscript
|
||||
:caption: Default value
|
||||
|
||||
templateRootPaths {
|
||||
0 = EXT:tt_address/Resources/Private/Templates/
|
||||
1 = {$plugin.tx_ttaddress.view.templateRootPath}
|
||||
}
|
||||
|
||||
**Example:**
|
||||
|
||||
Override the templates, partials and layouts of tt_adress in your own
|
||||
extension:
|
||||
|
||||
.. code-block:: typoscript
|
||||
:caption: EXT:my_extension/Configuration/TypoScript/setup.typoscript
|
||||
|
||||
plugin.tx_ttaddress {
|
||||
view {
|
||||
templateRootPaths {
|
||||
42 = EXT:my_extension/Resources/Private/Templates/Address
|
||||
}
|
||||
partialRootPaths {
|
||||
42 = EXT:my_extension/Resources/Private/Partials/Address
|
||||
}
|
||||
layoutRootPaths {
|
||||
42 = EXT:my_extension/Resources/Layouts/Templates/Address
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.. confval:: view.partialRootPaths
|
||||
|
||||
:Path: plugin.tx_ttaddress
|
||||
:type: array
|
||||
|
||||
Defines the path where the partials are located.
|
||||
|
||||
.. code-block:: typoscript
|
||||
:caption: Default value
|
||||
|
||||
partialRootPaths {
|
||||
0 = EXT:tt_address/Resources/Private/Partials/
|
||||
1 = {$plugin.tx_ttaddress.view.partialRootPath}
|
||||
}
|
||||
|
||||
Example: See :confval:`view.templateRootPaths`.
|
||||
|
||||
.. confval:: view.layoutRootPaths
|
||||
|
||||
:Path: plugin.tx_ttaddress
|
||||
:type: array
|
||||
|
||||
Defines the path where the layouts are located.
|
||||
|
||||
.. code-block:: typoscript
|
||||
:caption: Default value
|
||||
|
||||
layoutRootPaths {
|
||||
0 = EXT:tt_address/Resources/Private/Layouts/
|
||||
1 = {$plugin.tx_ttaddress.view.layoutRootPath}
|
||||
}
|
||||
|
||||
Example: See :confval:`view.templateRootPaths`.
|
||||
|
||||
Settings
|
||||
========
|
||||
|
||||
.. confval:: settings.overrideFlexformSettingsIfEmpty
|
||||
|
||||
:Path: plugin.tx_ttaddress
|
||||
:type: string
|
||||
:Default: paginate.itemsPerPage, singlePid, recursive
|
||||
|
||||
A comma separated list of fields which are filled from TypoScript if
|
||||
the equivalent flexform field is empty. This makes it possible to define
|
||||
default values in TypoScript
|
||||
|
||||
.. confval:: settings.recursive
|
||||
|
||||
:Path: plugin.tx_ttaddress
|
||||
:type: int
|
||||
|
||||
Defines how many levels to search for tt_address records from the given
|
||||
pages in pidList.
|
||||
|
||||
**Example:**
|
||||
|
||||
Search in a depth of 4 by default:
|
||||
|
||||
.. code-block:: typoscript
|
||||
:caption: EXT:my_sitepackage/Configuration/TypoScript/setup.typoscript
|
||||
|
||||
plugin.tx_ttaddress {
|
||||
settings {
|
||||
recursive = 4
|
||||
}
|
||||
}
|
||||
|
||||
.. confval:: settings.paginate
|
||||
|
||||
:Path: plugin.tx_ttaddress
|
||||
:type: array
|
||||
|
||||
A comma separated list of fields which are filled from TypoScript if
|
||||
the equivalent flexform field is empty. This makes it possible to define
|
||||
default values in TypoScript
|
||||
|
||||
.. code-block:: typoscript
|
||||
:caption: Default value
|
||||
|
||||
paginate {
|
||||
# can be overridden by plugin
|
||||
itemsPerPage = 10
|
||||
insertAbove = 0
|
||||
insertBelow = 1
|
||||
maximumNumberOfLinks = 10
|
||||
}
|
||||
|
||||
**Example:**
|
||||
|
||||
Show 50 items per page by default and the pagination both above and below:
|
||||
|
||||
.. code-block:: typoscript
|
||||
:caption: EXT:my_sitepackage/Configuration/TypoScript/setup.typoscript
|
||||
|
||||
plugin.tx_ttaddress {
|
||||
settings.paginate {
|
||||
itemsPerPage = 50
|
||||
insertAbove = 1
|
||||
insertBelow = 1
|
||||
}
|
||||
}
|
||||
|
||||
.. confval:: settings.map.rendering
|
||||
|
||||
:Path: plugin.tx_ttaddress
|
||||
:type: string
|
||||
:Default: leaflet
|
||||
|
||||
Map rendering which is used in the Fronted
|
||||
Available: leaflet, googleMaps, staticGoogleMaps
|
||||
|
||||
**Example:**
|
||||
|
||||
.. code-block:: typoscript
|
||||
:caption: EXT:my_sitepackage/Configuration/TypoScript/setup.typoscript
|
||||
|
||||
plugin.tx_ttaddress {
|
||||
settings {
|
||||
map {
|
||||
googleMaps.key = ABCDEFG123
|
||||
rendering = googleMaps
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.. confval:: settings.map.googleMaps.key
|
||||
|
||||
:Path: plugin.tx_ttaddress
|
||||
:type: string
|
||||
|
||||
Key for variant **Google Maps**
|
||||
|
||||
.. confval:: map.staticGoogleMaps.parameters
|
||||
|
||||
:Path: plugin.tx_ttaddress
|
||||
:type: array
|
||||
|
||||
Parameters for Static Google Maps configuration
|
||||
See: `official docs <https://developers.google.com/maps/documentation/maps-static/dev-guide>`__
|
||||
|
||||
|
||||
**Example:**
|
||||
|
||||
.. code-block:: typoscript
|
||||
:caption: EXT:my_sitepackage/Configuration/TypoScript/setup.typoscript
|
||||
|
||||
plugin.tx_ttaddress {
|
||||
settings {
|
||||
map {
|
||||
rendering = staticGoogleMaps
|
||||
staticGoogleMaps.parameters {
|
||||
center = Emanuel-Leutze-Straße 11, 40547 Düsseldorf
|
||||
zoom = 14
|
||||
size = 400x400
|
||||
key = ABCDEFG123
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,157 @@
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
|
||||
.. _development-extend-ttaddress:
|
||||
|
||||
|
||||
Extend models of tt_address
|
||||
===========================
|
||||
|
||||
If an additional field should be added to the `Address` model, there are several ways to achive this.
|
||||
This documentation prefers the usage of the extension `extender` (https://extensions.typo3.org/extension/extender/) by Sebastian Fischer.
|
||||
|
||||
This documentation is divided into the following sections:
|
||||
|
||||
- Install EXT:extender
|
||||
- Setup extension
|
||||
- Make the field available in backend
|
||||
- Configuration of EXT:extender
|
||||
- Use the field in frontend
|
||||
|
||||
Install EXT:extender
|
||||
--------------------
|
||||
Install the extension `extender` by either retrieve it from https://extensions.typo3.org/extension/extender or from the Extension Manager or use `composer req evoweb/extender`.
|
||||
|
||||
Setup extension
|
||||
---------------
|
||||
To extend an extension, you need to create an extension. In this example, the extension key will be called `address_field`
|
||||
and the vendor name will be `GeorgRinger`.
|
||||
|
||||
Create the directory `address_field` inside `typo3conf/ext/address_field`.
|
||||
|
||||
Create the following files and install the extension in the extension manager.
|
||||
|
||||
ext_emconf.php
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
.. code-block:: php
|
||||
|
||||
<?php
|
||||
|
||||
$EM_CONF[$_EXTKEY] = [
|
||||
'title' => 'Extend tt_address',
|
||||
'description' => 'New field in tt_address',
|
||||
'category' => 'plugin',
|
||||
'state' => 'alpha',
|
||||
'clearCacheOnLoad' => true,
|
||||
'version' => '1.0.0',
|
||||
'constraints' => [
|
||||
'depends' => [
|
||||
'extender' => '',
|
||||
'tt_address' => ''
|
||||
],
|
||||
'conflicts' => [],
|
||||
'suggests' => [],
|
||||
],
|
||||
];
|
||||
|
||||
ext_tables.sql
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
.. code-block:: sql
|
||||
|
||||
# Extend table structure for table 'tt_address'
|
||||
CREATE TABLE tt_address (
|
||||
quote text NOT NULL,
|
||||
);
|
||||
|
||||
.. note::
|
||||
|
||||
If you are using composor, don't forget to add the following entry to the PSR-4 section:
|
||||
`"GeorgRinger\\AddressField\\": "web/typo3conf/ext/address_field/Classes",` and use `composer dump-autoload`.
|
||||
|
||||
|
||||
|
||||
Make the field available in backend
|
||||
-----------------------------------
|
||||
|
||||
Create the following files
|
||||
|
||||
Configuration/TCA/Overrides/tt_address.php
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. code-block:: php
|
||||
|
||||
<?php
|
||||
defined('TYPO3_MODE') or die();
|
||||
|
||||
$columns = [
|
||||
'quote' => [
|
||||
'label' => 'A quote',
|
||||
'config' => [
|
||||
'default' => '',
|
||||
'type' => 'text',
|
||||
]
|
||||
]
|
||||
];
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tt_address', $columns);
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('tt_address', 'quote', '', 'after:description');
|
||||
// use next line to add it to an existing palette
|
||||
// \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addFieldsToPalette('tt_address', 'name', 'quote');
|
||||
|
||||
.. important::
|
||||
|
||||
Don't forget to clear the caches (preferred in Install Tool) to make the field available in backend.
|
||||
The field should appear after the field *Description*.
|
||||
|
||||
Configuration of EXT:extender
|
||||
-----------------------------
|
||||
|
||||
Create the following files
|
||||
|
||||
Classes/Extending/Domain/Model/Address.php
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
The extension "extender" merges with the one of `tt_address`. Be aware that it is only possible to extend the model by new properties and methods but not to change existing ones!
|
||||
|
||||
.. code-block:: php
|
||||
|
||||
<?php
|
||||
|
||||
namespace GeorgRinger\AddressField\Extending\Domain\Model;
|
||||
|
||||
class Address extends \FriendsOfTYPO3\TtAddress\Domain\Model\Address
|
||||
{
|
||||
|
||||
/** @var string */
|
||||
protected $quote = '';
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getQuote()
|
||||
{
|
||||
return $this->quote;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $quote
|
||||
*/
|
||||
public function setQuote($quote)
|
||||
{
|
||||
$this->quote = $quote;
|
||||
}
|
||||
}
|
||||
|
||||
ext_localconf.php
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. code-block:: php
|
||||
|
||||
<?php
|
||||
|
||||
$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['tt_address']['extender'][\FriendsOfTYPO3\TtAddress\Domain\Model\Address::class]['address_field'] = 'Domain/Model/Address';
|
||||
|
||||
|
||||
Use the field in frontend
|
||||
-------------------------
|
||||
After clearing the caches again, the new field is now available in the frontend in any template by using `{address.quote}`;
|
||||
15
typo3conf/ext/tt_address/Documentation/Development/Index.rst
Normal file
@@ -0,0 +1,15 @@
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
|
||||
.. _development:
|
||||
|
||||
Development
|
||||
===========
|
||||
Target group of this chapter are users who want to contribute to the extension, e.g. provide a bugfix or feature.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:titlesonly:
|
||||
|
||||
ExtendTtAddress/Index
|
||||
Tests/Index
|
||||
@@ -0,0 +1,51 @@
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
|
||||
.. _development-tests:
|
||||
|
||||
|
||||
Tests
|
||||
=====
|
||||
|
||||
The extension is fully covered by tests which run automatically for each commit and pull requests.
|
||||
You can find the output of those at https://travis-ci.org/FriendsOfTYPO3/tt_address or also as badge on the https://github.com/FriendsOfTYPO3/tt_address page.
|
||||
|
||||
If you want to provide a code change (which is awesome), you can also run those tests on your local environment.
|
||||
|
||||
.. note::
|
||||
|
||||
Detailed docs for writing tests for TYPO3 can be found online at https://docs.typo3.org/typo3cms/CoreApiReference/Testing/Index.html
|
||||
|
||||
**Requirements**
|
||||
|
||||
It is important to know that the site must be set up with composer to make tests working! Use
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
composer require typo3/testing-framework
|
||||
|
||||
Unit Tests
|
||||
----------
|
||||
Unit tests can be called by the following code:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
cd typo3conf/ext/tt_address
|
||||
../../../../phpunit -c ./Build/Local/phpunit.xml
|
||||
|
||||
# for specific tests
|
||||
../../../../phpunit -c ./Build/Local/phpunit.xml Tests/Unit/Controller/AddressControllerTest.php
|
||||
|
||||
# Generating coverage (xdebug is required)
|
||||
# the report can be found at typo3conf/ext/tt_address/Build/Local/report
|
||||
../../../../phpunit -c ./Build/Local/phpunit.xml --coverage-text --coverage-html=./Build/Local/report
|
||||
|
||||
Functional Tests
|
||||
----------------
|
||||
Functional tests can be called by the following code:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
cd typo3conf/ext/tt_address
|
||||
export typo3DatabaseName="functional";export typo3DatabaseHost="mysql";export typo3DatabaseUsername="root";export typo3DatabasePassword="dev";../../../../phpunit -c ./Build/Local/FunctionalTests.xml Tests/Functional
|
||||
|
||||
BIN
typo3conf/ext/tt_address/Documentation/Images/image-2.png
Normal file
|
After Width: | Height: | Size: 48 KiB |
BIN
typo3conf/ext/tt_address/Documentation/Images/image-5.png
Normal file
|
After Width: | Height: | Size: 55 KiB |
BIN
typo3conf/ext/tt_address/Documentation/Images/image-6.png
Normal file
|
After Width: | Height: | Size: 57 KiB |
BIN
typo3conf/ext/tt_address/Documentation/Images/image-7.png
Normal file
|
After Width: | Height: | Size: 53 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 109 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 28 KiB |
1
typo3conf/ext/tt_address/Documentation/Includes.rst.txt
Normal file
@@ -0,0 +1 @@
|
||||
.. You can put central messages to display on all pages here
|
||||
59
typo3conf/ext/tt_address/Documentation/Index.rst
Normal file
@@ -0,0 +1,59 @@
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
============
|
||||
Address List
|
||||
============
|
||||
|
||||
:Extension key:
|
||||
tt_address
|
||||
|
||||
:Package name:
|
||||
friendsoftypo3/tt-address
|
||||
|
||||
:Version:
|
||||
|release|
|
||||
|
||||
:Language:
|
||||
en
|
||||
|
||||
:Author:
|
||||
Georg Ringer & Contributors
|
||||
|
||||
:License:
|
||||
This document is published under the
|
||||
`Open Content License <https://www.openhub.net/licenses/opl>`__.
|
||||
|
||||
:Rendered:
|
||||
|today|
|
||||
|
||||
----
|
||||
|
||||
The basic aim of this extension is to store address and contact data and to
|
||||
output those in various ways:
|
||||
|
||||
- Selection based on categories and sysfolder
|
||||
- Manual selection with custom sorting
|
||||
- List & detail view
|
||||
- Various map views including Leaflet, Google Maps and static Google Maps
|
||||
|
||||
----
|
||||
|
||||
**Table of Contents:**
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:titlesonly:
|
||||
|
||||
Introduction/Index
|
||||
Administration/Index
|
||||
UsersManual/Index
|
||||
Configuration/Index
|
||||
Tutorials/Index
|
||||
Development/Index
|
||||
|
||||
.. Meta Menu
|
||||
|
||||
.. toctree::
|
||||
:hidden:
|
||||
|
||||
Sitemap
|
||||
@@ -0,0 +1,30 @@
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
|
||||
.. _introduction:
|
||||
|
||||
Introduction
|
||||
============
|
||||
|
||||
What does it do?
|
||||
----------------
|
||||
|
||||
This 2 goals of this extension are:
|
||||
|
||||
- Provide records which represent addresses and a plugin to output those in various variants
|
||||
- Provide a solid base for other extensions which use and extend the records.
|
||||
|
||||
Benefits of this extension are:
|
||||
|
||||
- actively maintained
|
||||
- is 100% covered by unit & functional tests
|
||||
- supports in its current version TYPO3 8.7 LTS & 9.5 LTS
|
||||
- implements all important micro data information to improve onpage search engine optimization (rich snippets)
|
||||
- Default templates are based on Twitter Bootstrap
|
||||
|
||||
Screenshots
|
||||
-----------
|
||||
|
||||
.. image:: ../Images/record_tab-general.png
|
||||
.. image:: ../Images/record_tab-address.png
|
||||
.. image:: ../Images/record_tab-contact.png
|
||||
9
typo3conf/ext/tt_address/Documentation/Sitemap.rst
Normal file
@@ -0,0 +1,9 @@
|
||||
:template: sitemap.html
|
||||
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
=======
|
||||
Sitemap
|
||||
=======
|
||||
|
||||
.. The sitemap.html template will insert here the page tree automatically.
|
||||
@@ -0,0 +1,38 @@
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
|
||||
.. _tutorial-displaymode:
|
||||
|
||||
Create custom display mode
|
||||
==========================
|
||||
The setting **Display Mode** can be found in the tab "Display". It can be used to change the template depending
|
||||
on the selection.
|
||||
|
||||
.. image:: ../../Images/tutorial-displaymode.png
|
||||
|
||||
|
||||
Add a new value
|
||||
---------------
|
||||
Add the following code to your `Page TsConfig`, either in the field *TsConfig* in the page properties or better to your site package extension.
|
||||
|
||||
.. code-block:: typoscript
|
||||
|
||||
TCEFORM {
|
||||
tt_content {
|
||||
pi_flexform {
|
||||
ttaddress_listview {
|
||||
sDISPLAY {
|
||||
settings\.displayMode.addItems {
|
||||
map = Map View
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Now a new option **Map View** is available with the value `map`.
|
||||
|
||||
Adopt templates
|
||||
---------------
|
||||
If a displaymode is selected, this can be checked in the template with `{settings.displayMode}`.
|
||||
19
typo3conf/ext/tt_address/Documentation/Tutorials/Index.rst
Normal file
@@ -0,0 +1,19 @@
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
|
||||
.. _tutorials:
|
||||
|
||||
Tutorials
|
||||
=========
|
||||
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:titlesonly:
|
||||
|
||||
Templates/Index
|
||||
Linkhandler
|
||||
RichSnippets/Index
|
||||
CustomDisplayMode/Index
|
||||
OverrideDemand/Index
|
||||
UsageOfAddressRepository/Index
|
||||
@@ -0,0 +1,65 @@
|
||||
.. include:: /Includes.rst.txt
|
||||
.. _linkhandler:
|
||||
|
||||
===========
|
||||
LinkHandler
|
||||
===========
|
||||
|
||||
The LinkHandler can be configured to create links to the detail view of
|
||||
tt_address records. If configured editing users can use the
|
||||
:ref:`LinkBrowser <t3coreapi:LinkBrowser>` in the rich-text-editor and link
|
||||
fields to link to the detail page of any address record.
|
||||
|
||||
Configuration for the backend
|
||||
=============================
|
||||
|
||||
:ref:`Page TSconfig <t3tsconfig:pagetsconfig>` is used to configure the link
|
||||
browser in the backend. See
|
||||
:ref:`Setting page TSconfig <t3tsconfig:setting-page-tsconfig>`.
|
||||
|
||||
For all available options see :ref:`t3coreapi:linkhandler-pagetsconfig`.
|
||||
|
||||
.. code-block:: typoscript
|
||||
:caption: EXT:my_sitepackage/Configuration/page.tsconfig
|
||||
|
||||
TCEMAIN.linkHandler {
|
||||
# my_address is an identifier, do not change it after links have been created
|
||||
my_address {
|
||||
handler = TYPO3\CMS\Recordlist\LinkHandler\RecordLinkHandler
|
||||
label = Contact
|
||||
configuration {
|
||||
table = tt_address
|
||||
# This storage pid is pre-selected by default
|
||||
storagePid = 42
|
||||
# Only these folders and their subfolders are displayed in the pagetree
|
||||
pageTreeMountPoints = 42, 43, 88
|
||||
hidePageTree = 0
|
||||
}
|
||||
scanAfter = page
|
||||
displayBefore = file
|
||||
}
|
||||
}
|
||||
|
||||
Configuration for the frontend
|
||||
==============================
|
||||
|
||||
The links are now stored in the database with the syntax
|
||||
:html:`<a href="t3://record?identifier=tt_address&uid=456">A link</a>`.
|
||||
By using TypoScript, these pseudo link is transformed into an actual link.
|
||||
|
||||
See :ref:`t3coreapi:linkhandler`.
|
||||
|
||||
.. code-block:: typoscript
|
||||
:caption: EXT:my_sitepackage/Configuration/TypoScript/setup.typoscript
|
||||
|
||||
config.recordLinks {
|
||||
# Use the same identifier as was used in :typoscript:`TCEMAIN.linkHandler`
|
||||
my_address {
|
||||
typolink {
|
||||
# Detail page uid
|
||||
parameter = 192
|
||||
additionalParams.data = field:uid
|
||||
additionalParams.wrap = &tx_ttaddress_listview[action]=show&tx_ttaddress_listview[address]=|&tx_ttaddress_listview[controller]=Address
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
|
||||
.. _tutorial-overrideDemand:
|
||||
|
||||
Override demand object
|
||||
======================
|
||||
It is possible to override the flexform configuration by providing additional GET arguments.
|
||||
|
||||
.. important::
|
||||
|
||||
This feature needs to be enabled per plugin with the checkbox *Allow override configuration by GET/POST*.
|
||||
|
||||
The following properties are allowed:
|
||||
|
||||
- `categories`: List of category ids
|
||||
- `categoryCombination`: Either the value `or` or `and`
|
||||
- `includeSubCategories`: Either 0 or 1
|
||||
- `sortOrder`: Either the value `asc` or `desc`
|
||||
|
||||
Example
|
||||
-------
|
||||
|
||||
The following example will create a link which filters the result by the category with uid `1`.
|
||||
|
||||
.. code-block:: html
|
||||
|
||||
<f:link.page
|
||||
additionalParams="{tx_ttaddress_listview:{override:{categories: 1}}}">
|
||||
Category 1
|
||||
</f:link.page>
|
||||
@@ -0,0 +1,20 @@
|
||||
.. include:: /Includes.rst.txt
|
||||
|
||||
|
||||
.. _tutorial-rich_snippets:
|
||||
|
||||
Rich snippets
|
||||
=============
|
||||
When you use structured data to mark up content, you help
|
||||
Google better understand its context for display in Search, and you achieve better distribution of your content to
|
||||
users from Search. (quote by google)
|
||||
|
||||
The full article can be found at https://developers.google.com/search/docs/guides/mark-up-content
|
||||
|
||||
The extension `tt_address` follows the guidelines and adds the proper information to every output of a field.
|
||||
|
||||
Testing
|
||||
-------
|
||||
If the templates are modified it is important to test if the markup is still valid regarding the rich snippets.
|
||||
|
||||
Google provides an online tool at https://search.google.com/structured-data/testing-tool/u/0/ which can be used for that.
|
||||