Skip to content

Instantly share code, notes, and snippets.

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

Bastian Waidelich bwaidelich

🏠
Working from home
View GitHub Profile
@bwaidelich
bwaidelich / DispatchComponent.php
Last active March 23, 2017 14:58
A custom implementation of the default TYPO3.Flow DispatchComponent that allows for redirecting to a configurable URI upon access denied exceptions
<?php
namespace Wwwision\Test\Mvc;
/* *
* This script belongs to the TYPO3 Flow package "Wwwision.Test". *
* *
* */
use TYPO3\Flow\Annotations as Flow;
use TYPO3\Flow\Http\Component\ComponentChain;
<link rel="import" href="../google-map/google-map-search.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-scroll-header-panel/core-scroll-header-panel.html">
<link rel="import" href="../paper-input/paper-input.html">
<link rel="import" href="../paper-button/paper-button.html">
<polymer-element name="my-element">
<template>
@bwaidelich
bwaidelich / Jwt.php
Last active February 2, 2017 13:36
Simple JWT based authentication for TYPO3 Flow (see http://jwt.io/).
<?php
namespace Wwwision\Jwt\Security\Authentication\Token;
use TYPO3\Flow\Annotations as Flow;
use TYPO3\Flow\Mvc\ActionRequest;
use TYPO3\Flow\Security\Authentication\Token\AbstractToken;
use TYPO3\Flow\Security\Authentication\Token\SessionlessTokenInterface;
/**
* An authentication token used for simple username and password authentication.
@bwaidelich
bwaidelich / Root.ts2
Created January 11, 2015 09:49
Getting an exception "Exception while rendering rawContent [...] No content collection of type TYPO3.Neos:ContentCollection could be found in the current node" in TYPO3 Neos 1.2.1? This happens due to a regression in that very release (see https://jira.typo3.org/browse/NEOS-921). The bug is already fixed in git and will be in the next bugfix rel…
rawContent.body.allContentCollections.renderer = TYPO3.Neos:RawContent
@bwaidelich
bwaidelich / Routes.yaml
Last active August 29, 2015 14:01
Example routing setup for the "Flickr" Plugin of the TYPO3.NeosDemoTypo3Org package
-
name: 'Flickr: User stream'
uriPattern: '{node}/user/{--typo3_neosdemotypo3org-flickr.userId}.html'
defaults:
'@package': 'TYPO3.Neos'
'@controller': 'Frontend\Node'
'@action': 'show'
'@format': 'html'
'--typo3_neosdemotypo3org-flickr':
'@package': 'TYPO3.NeosDemoTypo3Org'
@bwaidelich
bwaidelich / FluidFinisher.php
Last active August 29, 2015 14:01
Fluid finisher for the TYPO3.Form package
<?php
namespace Your\Package\Form\Finishers;
use TYPO3\Flow\Utility\Arrays;
use TYPO3\Fluid\View\StandaloneView;
use TYPO3\Form\Core\Model\AbstractFinisher;
use TYPO3\Form\Core\Runtime\FormRuntime;
use TYPO3\Form\Exception\FinisherException;
/**
@bwaidelich
bwaidelich / SentryExceptionHandler.php
Created April 30, 2014 08:00
Using Sentry for tracking errors in TYPO3 Flow
<?php
namespace Your\Package\Error;
/* *
* This script belongs to the TYPO3 Flow package "Your.Package". *
* *
* */
use TYPO3\Flow\Error\ProductionExceptionHandler;
@bwaidelich
bwaidelich / Settings.yaml
Last active September 22, 2022 16:19
A simple example showing how doctrine behaviors (in this chase soft-deleteable) can be used within TYPO3 Flow.
TYPO3:
Flow:
# disable reflection for non psr-0 compliant 3rd party packages
object:
excludeClasses:
'gedmo.doctrineextensions' : ['Gedmo\\.*']
# register soft deletable filter & event listeners
persistence:
doctrine:
@bwaidelich
bwaidelich / AbstractCommandController.php
Created January 21, 2014 08:52
An AbstractCommandController that adds a flag "force" to the output* method in order to render strings directly to the console
<?php
namespace Your\Package\Command;
use TYPO3\Flow\Annotations as Flow;
use TYPO3\Flow\Cli\CommandController;
/**
* Abstract base class for command controllers of the "Your.Package" package
*/
abstract class AbstractCommandController extends CommandController {
@bwaidelich
bwaidelich / PdfJob.php
Created November 18, 2013 15:39
Example usage for the ``TYPO3.JobQueue.Common`` TYPO3 Flow package (JobManager)
<?php
namespace Acme\JobQueueTest;
/* *
* This script belongs to the TYPO3 Flow package "Acme.JobQueueTest". *
* *
* */
use TYPO3\Flow\Annotations as Flow;
use TYPO3\Flow\Utility\Files;