This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Workaround for broken rel attribute of lightbox links in TYPO3 8.7 | |
# See https://forge.typo3.org/issues/72779 | |
lib.contentElement.variables.10 = LOAD_REGISTER | |
lib.contentElement.variables.10.content_uid = TEXT | |
lib.contentElement.variables.10.content_uid.field = uid | |
lib.contentElement.settings.media.popup.linkParams.ATagParams.dataWrap = class="{$styles.content.textmedia.linkWrap.lightboxCssClass}" rel="{$styles.content.textmedia.linkWrap.lightboxRelAttribute}[{register:content_uid}]" | |
lib.contentElement.stdWrap.append = RESTORE_REGISTER |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Help based on https://gist.github.com/prwhite/8168133 thanks to @nowox and @prwhite | |
# And add help text after each target name starting with '\#\#' | |
# A category can be added with @category | |
HELP_FUN = \ | |
%help; \ | |
while(<>) { push @{$$help{$$2 // 'options'}}, [$$1, $$3] if /^([\w-]+)\s*:.*\#\#(?:@([\w-]+))?\s(.*)$$/ }; \ | |
print "\nusage: make [target ...]\n\n"; \ | |
for (keys %help) { \ | |
print "$$_:\n"; \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Vendor\Extension\View\Record; | |
class ListJson extends \TYPO3\CMS\Extbase\Mvc\View\JsonView { | |
private static $uriBuilder = null; | |
public function typolink($page, $uid = null) { | |
if ($page) { | |
if (self::$uriBuilder === null) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Wanna export a joined result? | |
SELECT a.id, a.name, b.name | |
FROM tableA a | |
JOIN tableB b ON a.id = b.rel_id | |
WHERE a.deleted=0 and b.deleted=0 | |
ORDER BY a.name, b.nane | |
INTO OUTFILE '/var/lib/mysql-files/xxxx.csv' | |
FIELDS TERMINATED BY ',' | |
ENCLOSED BY '"' | |
LINES TERMINATED BY '\n'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Find out what charset and collation the DB has: | |
SELECT SCHEMA_NAME 'database', default_character_set_name 'charset', DEFAULT_COLLATION_NAME 'collation' | |
FROM information_schema.SCHEMATA; | |
-- Find out what charset and collation the tables have: | |
SELECT T.table_name, CCSA.character_set_name, CCSA.collation_name FROM information_schema.`TABLES` T, | |
information_schema.`COLLATION_CHARACTER_SET_APPLICABILITY` CCSA | |
WHERE CCSA.collation_name = T.table_collation | |
-- Change charset and collation of DB: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Vendor\ExtensionName\Domain\Repository; | |
class XyzRepository extends \TYPO3\CMS\Extbase\Persistence\Repository { | |
public function findByFoo($value) | |
{ | |
$query = $this->createQuery(); | |
#$query->setFancyConstrations(...) | |
$this->debugQuery($query); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Vendor\ExtensionName\Domain\Repository; | |
class XyzRepository extends \TYPO3\CMS\Extbase\Persistence\Repository { | |
public function findByFoo($value) | |
{ | |
$query = $this->createQuery(); | |
#$query->setFancyConstrations(...) | |
$this->debugQuery($query->execute()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (!defined('TYPO3_MODE')) { | |
die('Access denied.'); | |
} | |
$GLOBALS['TCA']['tx_customext_domain_model_department'] = array( | |
'ctrl' => array( | |
'title' => 'LLL:EXT:custom_ext/Resources/Private/Language/locallang_db.xlf:tx_custom_ext_domain_model_department', | |
// title prefixed by department_id | |
'label' => 'department_id', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------------------------- | |
# PHP-Compatibility | |
# ------------------------- | |
# Add dev requirements | |
composer require --dev phpcompatibility/php-compatibility | |
# List installed configs (should be none) | |
bin/phpcs --config-show |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (version_compare(PHP_VERSION, '7.0.0', '>=') { | |
... | |
} | |
if (version_compare(TYPO3_version, '8.7.0', '>=') { | |
... | |
} |
OlderNewer