Skip to content

Instantly share code, notes, and snippets.

View johannessteu's full-sized avatar
🌵
:)

Johannes Steu johannessteu

🌵
:)
View GitHub Profile
@johannessteu
johannessteu / TYPO3.Neos - PluginViews
Last active August 29, 2015 14:07
TYPO3.Neos Prevent PluginViews from getting cached
prototype(TYPO3.Neos:PluginView) {
@cache {
mode = 'uncached'
context {
1 = 'node'
2 = 'documentNode'
}
}
}
@johannessteu
johannessteu / Run TYPO3 Neos 1.2 beta in docker
Last active August 29, 2015 14:09
Test TYPO3 Neos 1.2 beta with docker
docker pull johannessteu/typo3neos
docker run --name neos-mysql -e MYSQL_ROOT_PASSWORD=YOUR_PASSWORD -d mysql
docker run --name neos -d -p 8080:80 --link neos-mysql:db -e VERSION=1.2 johannessteu/typo3neos
Wait 1-2 minutes and you will be able to see neos runnting under port 8080 on your server/ip/domain.
You can use docker logs -f neos to see the installation process
For further informations check this out:
https://registry.hub.docker.com/u/johannessteu/typo3neos/
@johannessteu
johannessteu / EelExpressions to filter Nodes in PHP
Created November 25, 2014 08:53
Use EelExpressions to filter Nodes in PHP
/**
* @var SiteRepository
* @Flow\Inject
*/
protected $siteRepository;
/**
* @var \TYPO3\Neos\Domain\Service\ContentContextFactory
* @Flow\Inject
*/
@johannessteu
johannessteu / NodeConverter
Created December 5, 2014 13:07
Convert a Node to Model
class AbstractProductConverter extends AbstractTypeConverter {
/**
* @var PropertyMapper
* @Flow\Inject
*/
protected $propertyMapper;
/**
* {@inheritDoc}
@johannessteu
johannessteu / EelEvaluator
Created December 8, 2014 07:45
Use an Eel-Expression in PHP
/** @var Site $site */
$site = $this->siteRepository->findOnline()->getFirst();
/** @var ContentContext $context */
$context = $this->contentContextFactory->create(array("currentSite" => $site));
$eelEvaluator = $this->objectManager->get('TYPO3\Eel\EelEvaluatorInterface');
$result = \TYPO3\Eel\Utility::evaluateEelExpression('${q(site).find("myQuery").get()}', $eelEvauator, array("site" => $context->getCurrentSiteNode()));
<?php
namespace Vendor\Package\FlowQuery;
class ResourceUrlOperation extends \TYPO3\Eel\FlowQuery\Operations\AbstractOperation {
/**
* {@inheritdoc}
*
* @var string
@johannessteu
johannessteu / NodeTypes.yaml
Created May 8, 2015 08:40
TYPO3 Neos 1.2 Plugin definition
'Vendor.Name.package:MyPlugin':
superTypes: ['TYPO3.Neos:Plugin']
ui:
group: 'plugins'
label: 'My plugin'
icon: 'icon-truck'
inspector:
groups:
configuration:
label: 'Configuration'
{
"repositories": [
{
"type": "composer",
"url": "http://composer.typo3.org/"
},
{
"type": "git",
"url": "https://github.com/jSteu/gridelements.git"
},
@johannessteu
johannessteu / gulpfile.js
Created July 20, 2015 08:16
Gulp Tasks for Neos
var gulp = require('gulp');
// Plugins
var sass = require('gulp-sass');
var uglify = require('gulp-uglify');
var cssmin = require('gulp-cssmin');
var rename = require('gulp-rename');
var imagemin = require('gulp-imagemin');
var concat = require('gulp-concat');
var copy = require('gulp-copy');
@johannessteu
johannessteu / composer.json
Last active August 29, 2015 14:28 — forked from kitsunet/composer.json
Neos Collection Install
{
"name": "typo3/neos-base-distribution",
"description" : "TYPO3 Neos Base Distribution",
"license": "GPL-3.0+",
"support": {
"email": "neos@typo3.org",
"irc": "irc://irc.freenode.org/typo3-neos",
"forum": "http://forum.typo3.org/index.php/f/121/",
"issues": "https://jira.typo3.org/",
"source": "https://git.typo3.org/"