Skip to content

Instantly share code, notes, and snippets.

@grebaldi
grebaldi / form value access.yaml
Last active August 29, 2015 14:19
You can access form values in Form Finisher option values.
-
identifier: Some.Package:SomeFinisher
options:
someOption: '{request.arguments.email}' # Access to form values
@grebaldi
grebaldi / UnitTest.php
Created November 16, 2015 09:44
Flow UnitTest boilerplate
<?php
namespace Vendor\Package\Tests\Unit\Namespace;
use TYPO3\Flow\Tests\UnitTestCase;
class MyUnitTest extends UnitTestCase {
/**
* @test
*/
@grebaldi
grebaldi / draft.js
Created November 26, 2015 21:14
Processing library draft
const graph = {
page: Page({
headline: Headline({
text: context => 'Hello World!'
}),
body: Collection({
collection: context => context.get('posts'),
itemName: context => 'post',
itemRenderer: BlogPost({
@grebaldi
grebaldi / gist:2f6574f50bfa30b87e87
Last active November 2, 2016 03:00
PHP 7 Features

PHP 7

Features you might not have known in 5.4, 5.5, 5.6

5.4

  • Traits
  • Short array syntax
  • $this in closures
@grebaldi
grebaldi / commandlist
Created March 20, 2016 16:40
All CKEDITOR commands
a11yHelp
about
accessNextSpace
accessPreviousSpace
anchor
bidiltr
bidirtl
blockquote
blur
blurBack
@grebaldi
grebaldi / Schema-scribble.yaml
Created March 30, 2016 07:18
YAML Schema validation for Flow\Neos
#
# NodeTypes
#
'*':
reference: 'nodeTypeName'
type: shape
options:
shape:
'abstract': { type: bool }
'final': { type: bool }
@grebaldi
grebaldi / draft.js
Created April 1, 2016 17:37
Stupid rendering approach
const graph = {
page: Page({
headline: Headline({
text: context => 'Hello World!'
}),
body: Collection({
collection: context => context.get('posts'),
itemName: context => 'post',
itemRenderer: BlogPost({
@grebaldi
grebaldi / implementation.js
Created April 1, 2016 17:44
Weird rendering approach
const RENDER_COMMAND = '@blubb/RENDER';
const createOverride = factory => {
const override = lower => {
if (lower === RENDER_COMMAND) {
return factory();
}
return createOverride(upper => factory(Object.assign(lower, upper)));
};
@grebaldi
grebaldi / renderingContext.js
Created April 1, 2016 19:04
rendering context
setRenderers({
'MyAwesome.Package:GridItem': GridItem,
'MyAweSome.Package:GridItem MyAwesome.Package:Image': Image
});
@context()
class GridItem extends Component {
static propTypes = {
renderingContext: PropType.instanceOf(RenderingContext)
};
@grebaldi
grebaldi / myEditor.js
Last active April 29, 2016 08:21
How runtime dependencies could work for Guevara
export default Neos => {
const {React, Components, api} = Neos;
const {Component} = React;
const {Button, Input, PageTree} = Components;
//
// How to connect this to the store? Should we expose @connect?
//
return class MyCustomComponent extends Component {
render() {