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
<?php
$mockHttpRequest = \TYPO3\FLOW3\Http\Request::create(new \TYPO3\FLOW3\Http\Uri('http://mock'));
$request = $mockHttpRequest->createActionRequest();
$response = new \TYPO3\FLOW3\Http\Response();
?>
<?php
namespace TYPO3\Conference\Command;
/* *
* This script belongs to the FLOW3 package "Conference". *
* *
* It is free software; you can redistribute it and/or modify it under *
* the terms of the GNU Lesser General Public License as published by the *
* Free Software Foundation, either version 3 of the License, or (at your *
* option) any later version. *
<?php
namespace TYPO3\Fluid\ViewHelpers\Format;
/* *
* This script belongs to the FLOW3 package "Fluid". *
* *
* 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. *
* *
<?php
namespace MyPackage\Controller;
class TestController extends \TYPO3\FLOW3\Mvc\Controller\ActionController {
public function indexAction() {
}
/**
* @param string $credit
<?php
public function showAction(Tx_MeineExt_Domain_Model_Category $category) {
$this->view->assign('category', $category);
$projects = $this->projectRepository->findByCategory($category);
$this->view->assign('projects', $projects);
}
?>
<?php
// public function loadConfigurationCache() ...
/**
* If a cache file with previously saved configuration exists, it is removed.
*
* @return void
*/
public function flushConfigurationCache() {
<?php
namespace TYPO3\Form\Factory;
/* *
* This script belongs to the FLOW3 package "TYPO3.Form". *
* *
* 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. *
* *
@bwaidelich
bwaidelich / EntityManagerFactoryAspect.php
Created October 19, 2012 11:13
Doctrine behaviors in TYPO3 Flow - Example: Softdeletable
<?php
namespace YourPackage\Aop;
use TYPO3\Flow\Annotations as Flow;
/**
* @Flow\Aspect
*/
class EntityManagerFactoryAspect {
@bwaidelich
bwaidelich / CacheViewHelper.php
Created November 29, 2012 12:03
Cache View Helper for TYPO3 Fluid
<?php
namespace Your\Package\ViewHelpers;
/* *
* This script belongs to the TYPO3 Flow package "Your.Package". *
* *
* 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. *
* *
@bwaidelich
bwaidelich / Menu.html
Created December 6, 2012 11:36
TYPO3 Flow menu with Fluid and DTOs
<ul class="nav{f:if(condition: menuClass, then: ' {menuClass}')}"<f:for each="{menu.attributes}" as="attributeValue" key="attributeName"> {attributeName}="{attributeValue}"</f:for>>
<f:for each="{menu.menuItems}" as="menuItem" iteration="iteration">
<f:if condition="{menuItem.header}">
<f:then>
<li class="nav-header {menuItem.class}"<f:for each="{menuItem.attributes}" as="attributeValue" key="attributeName"> {attributeName}="{attributeValue}"</f:for>>{menuItem.label}</li>
</f:then>
<f:else>
<f:if condition="{menuItem.separator}">
<f:then>
<li class="divider {menuItem.class}"<f:for each="{menuItem.attributes}" as="attributeValue" key="attributeName"> {attributeName}="{attributeValue}"</f:for>></li>