Skip to content

Instantly share code, notes, and snippets.

View johannessteu's full-sized avatar
🌵
:)

Johannes Steu johannessteu

🌵
:)
View GitHub Profile
@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()));
@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 / 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 / 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 / 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 / TYPO3 Neos plugin: route configuration
Last active December 18, 2015 22:30
Neos Plugin Routes.yaml
URL:
http://example.com/nodename.html?
--vendor_name-fooplugin[package]=vendor.name&
--vendor_name-fooplugin[controller]=standard&
--vendor_name-fooplugin[action]=index&
--vendor_name-fooplugin[object][__identity]=4de2cc9c-79c0-55e7-310e-91c5ae2fea19
should result in
http://example.com/nodename/custom-part/objectname.html