Skip to content

Instantly share code, notes, and snippets.

View mneuhaus's full-sized avatar

Marc Neuhaus mneuhaus

View GitHub Profile
{namespace flux=FluidTYPO3\Flux\ViewHelpers}
{namespace v=FluidTYPO3\Vhs\ViewHelpers}
<f:layout name="Content" />
<f:section name="Configuration">
<flux:form wizardTab="Inhaltselemente" id="textWithImage" label="Text mit Bild">
<flux:field.file name="file" label="Bild"/>
<flux:field.text name="header" label="Überschrift" rows="2"/>
<flux:field.text name="description" label="Beschreibung" rows="5" enableRichText="TRUE" />
<flux:field.input name="target" label="Verknüpfung">
{namespace flux=FluidTYPO3\Flux\ViewHelpers}
{namespace v=FluidTYPO3\Vhs\ViewHelpers}
{namespace t=Tx_Template_ViewHelpers}
<f:layout name="Content" />
<f:section name="Configuration">
<flux:form wizardTab="Inhaltselemente" id="references" label="Referenzen">
<flux:grid>
<f:for each="{elements}" as="element" iteration="iteration">
<f:for each="{element}" key="elementType" as="elementData">
@mneuhaus
mneuhaus / 1_Intro.md
Last active August 29, 2015 14:07
Famelo.Soul: a flexible controller flow with a persistent state for TYPO3.Flow

Combinations of Controllers/Actions that span wider than 2-3 Actions are simple to code, but often result in extremely rigid and unflexible structures that are not easily extendable or modularized. The biggest example is for example a User Registration, this kind of process varies quite extremely in any kind of project. Some times it's enough to have a simple form + e-mail verification, sometimes you need a quite complex process with verification, invoicing, reviewing, etc. Currently it's often necessary to reimplement various of this things from the ground up.

I've been toying with a basic concept for a while in my head which could be shortly described as combination of controllers/actions that are tied together by conditions through a settings.yaml which share and manipulate a state that's automatically persisted.

###Terminology

Soul: The Soul is an entity containing the current state of the process Fragment: a Fragment is

{namespace v=FluidTYPO3\Vhs\ViewHelpers}
{namespace flux=FluidTYPO3\Flux\ViewHelpers}
<f:layout name="Content" />
<f:section name="Configuration">
<flux:form wizardTab="Inhaltselemente" id="grid176617" options="{useTypoScript: 0}" label="Grid: 17-66-17">
<flux:grid>
<flux:grid.row>
<flux:grid.column style="width: 17%;border-right: 1px dotted #999;" name="column1" label="Spalte 1" />
<?php
function get_sub*($name) {
return $values[$name];
}
function the_sub*($name) {
echo $values[$name];
// es wird kein wert zurückggegeben
<section role="wrapper">
<div id="c1" class="csc-default"><section class="default">
<div class="tx-mflgcregistration container">
<h1>Registration</h1>
<h2>Please complete your registration on the following two pages.</h2>
<div class="tx_mflgcregistration">
<p>Please enter the registration code of your invitation to continue.</p>
(function($) {
$(document).ready(function() {
window.onresize = function(){
var agent = navigator.userAgent;
var current_width = window.innerWidth;
var html = document.getElementsByTagName('html')[0];
if (agent.match(/Android.*Mobile|BlackBerry|iPhone|iPod|Opera Mini|IEMobile/i)) {
html.className = "mobile";
} else if (agent.match(/Android|iPad/i)) {
{namespace flux=FluidTYPO3\Flux\ViewHelpers}
{namespace v=FluidTYPO3\Vhs\ViewHelpers}
<f:layout name="Content" />
<f:section name="Configuration">
<flux:form id="textWithImage" label="Text mit Bild">
<flux:field.text name="description" label="Beschreibung" rows="5" enableRichText="TRUE" />
<flux:field.input name="target" label="Verknüpfung">
<flux:wizard.link />
</flux:field.input>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<script>
function subst() {
var vars={};
var x=document.location.search.substring(1).split('&');
<!DOCTYPE html>
<html>
<head>
<title>foo</title>
</head>
<body>
<?php
$videoUrl = 'https://fbcdn-video-c-a.akamaihd.net/hvideo-ak-xaf1/v/t42.1790-2/10812569_395357007287163_395851536_n.mp4?rl=721&vabr=401&oh=5a9ff177402a2c3a84b5b0e5fe281d77&oe=54C669F0&__gda__=1422292559_f8027f663520ec309489a4a3130ad394';
$videoId = '395355717287292';