Skip to content

Instantly share code, notes, and snippets.

@htuscher
htuscher / Root.fusion
Last active May 20, 2017 19:11
Neos Atomic.Fusion example atom and molecule
prototype(Onedrop.Demo:Atom.Button) < prototype(PackageFactory.AtomicFusion:Component) {
text = ''
type = 'default'
size = ''
renderer = Neos.Fusion:Tag {
tagName = 'button'
attributes.class = PackageFactory.AtomicFusion:ClassNames {
btn = true
btn-default = ${props.type == 'default'}
@aertmann
aertmann / Donate.ts2
Last active February 12, 2018 21:30
Donation plugin for Neos using form framework and custom payment gateway integration (QuickPay) – Included in https://speakerdeck.com/aertmann/tasty-recipes-for-every-day-neos
prototype(Acme.Donate:Donate) < prototype(TYPO3.Neos:Plugin) {
package = 'Venstre.VenstreDk'
controller = 'Donate'
node = ${node}
}
@aertmann
aertmann / Article.html
Last active December 8, 2017 15:43
News with inline editable headline & lead & image, list view with ajax loading, overview, single view, tagging and RSS using News document node type and Elasticsearch for Neos – Included in https://speakerdeck.com/aertmann/tasty-recipes-for-every-day-neos
{namespace neos=TYPO3\Neos\ViewHelpers}
{namespace media=TYPO3\Media\ViewHelpers}
<f:layout name="Page" />
<f:section name="body">
<article itemscope="" itemtype="http://schema.org/Article" xmlns:f="http://www.w3.org/1999/html">
<header>
<f:if condition="{tags}">
<f:for each="{tags}" as="articleTag" iteration="iterator">
<f:if condition="{iterator.isFirst}">
<?php
namespace MOC\...\ViewHelpers\Form;
/**
* The form checkbox select view helper
*
* @scope prototype
*/
class CheckboxSelectViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper {
@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;
/**
@aertmann
aertmann / Method1.html
Last active September 7, 2018 21:21
Inline editable properties for a document node (two different approaches) – TYPO3 Neos
<neos:contentElement.wrap node="{node}">
<header>
<neos:contentElement.editable property="title" tag="h1" />
</header>
</neos:contentElement.wrap>
@cs278
cs278 / is_serialized.php
Created October 23, 2009 18:25
PHP is_serialized() function.
<?php
/**
* This program is free software. It comes without any warranty, to
* the extent permitted by applicable law. You can redistribute it
* and/or modify it under the terms of the Do What The Fuck You Want
* To Public License, Version 2, as published by Sam Hocevar. See
* http://sam.zoy.org/wtfpl/COPYING for more details.
*/
/**