Skip to content

Instantly share code, notes, and snippets.

View soee's full-sized avatar
🏠
Working from home

Marcin Sągol soee

🏠
Working from home
View GitHub Profile
@visay
visay / PdfThumbnailViewHelper.php
Last active August 29, 2015 14:10
Render thumbnail from PDF file for a node type
<?php
namespace WE\SitePackage\ViewHelpers;
/* *
* This script belongs to the TYPO3 Flow package "WE.SitePackage". *
* *
* It is free software; you can redistribute it and/or modify it under *
* the terms of the GNU Lesser General Public License, either version 3 *
* of the License, or (at your option) any later version. *
* *
@helhum
helhum / PersistentObjectConverter.php
Last active January 24, 2021 14:08
Extbase TypeConverter to fetch hidden records from persistence (Using this will *always* fetch hidden models of the specified type)
<?php
namespace MyVendor\MyExtension\Property\TypeConverters
use TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter
class MyPersistentObjectConverter extends PersistentObjectConverter {
/**
* @var string
*/
@infusion
infusion / import-tar-gz.sh
Last active May 4, 2023 06:00
Import a tar.gz file to MySQL
tar xOf dump.sql.tar.gz | mysql -u $user -p $database
@jrenggli
jrenggli / AdditionalConfiguration.php
Created December 16, 2015 21:26
pageNotFound_handling for restricted pages in TYPO3
$GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFound_handling'] = 'USER_FUNCTION:EXT:usermytemplate/Classes/Utility/PageNotFoundHandling.php:user_pageNotFound->pageNotFound';
// Custom configuration for multi-language 404 page, see EXT:usermytemplate/Classes/Utility/PageNotFoundHandling.php
// ID of the page to redirect to if page was not found
$GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFound_handling_redirectPageID'] = 123;
// ID of the page to redirect to if current page is access protected
$GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFound_handling_loginPageID'] = 789;
@cedricziel
cedricziel / CustomerAutocompletion.php
Created November 4, 2016 14:40
TYPO3 CMS 7 fully loaded TSFE in EiD
<?php
namespace Project\Namespace\Hooks;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Core\Core\Bootstrap;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
@rvollebregt
rvollebregt / debug-sql
Last active September 8, 2021 14:34
Debug SQL query in TYPO3 8 Extbase
/** @var ObjectManager $objm */
$dbParser = $this->objectManager->get(Typo3DbQueryParser::class);
$sql = $dbParser->convertQueryToDoctrineQueryBuilder($query)->getSQL();
DebuggerUtility::var_dump($sql);