Skip to content

Instantly share code, notes, and snippets.

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

C. Riccabona BastianBalthasarBux

🏠
Working from home
View GitHub Profile
@benjaminrau
benjaminrau / Controller.php
Last active October 10, 2019 13:07
Fill ObjectStorage from QueryResult
$objectStorage = $this->fillOjectStorageFromQueryResult($this->myRepository->findAll()));
/**
* Fill objectStorage from QueryResult
*
* @param \TYPO3\CMS\Extbase\Persistence\QueryResultInterface $queryResult
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage
*/
protected function fillOjectStorageFromQueryResult(\TYPO3\CMS\Extbase\Persistence\QueryResultInterface $queryResult=NULL) {
@uberboom
uberboom / CleanSource.php
Last active December 17, 2019 15:01
TYPO3: Hook to remove the generator meta tag (TYPO3 CMS 6.2)
<?php
namespace Your\Extension\Namespace\Hooks;
/**
* Clean up source
*/
class CleanSource extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin
{
/**
@wolffc
wolffc / extabase_in_controller_action_validation_example.php
Created May 7, 2015 07:34
This is an TYPO3 / Extbase Example on how to Validate some Properties in the Controller - this is usefull for conditonal Validation
<?php
class foo {
/**
* keep trac if we have created a custom error.
* @var boolean
*/
protected $hasCustomError = false;
@smichaelsen
smichaelsen / QueryResult.php
Created November 12, 2015 08:19
Extend extbase QueryResult to fix count() of queries with a custom $statement
<?php
namespace AppZap\Tripshop\Persistence;
use TYPO3\CMS\Extbase\Persistence\Generic\Qom\Statement;
class QueryResult extends \TYPO3\CMS\Extbase\Persistence\Generic\QueryResult
{
/**
* Overwrites the original implementation of Extbase
*
@pgampe
pgampe / menu.ts
Last active August 4, 2020 12:51
Fully cached menu with TypoScript
page.10 >
page.10 = COA
page.10 {
cache {
key = main-menu
}
10 = TEXT
10 {