Skip to content

Instantly share code, notes, and snippets.

View nezaniel's full-sized avatar

Bernhard Schmitt nezaniel

View GitHub Profile
@nezaniel
nezaniel / MyEndpoint.php
Created March 12, 2024 14:23
HTTP Endpoint Implementation
<?php
declare(strict_types=1);
#[Path('/my/endpoint')]
final class MyEndpoint extends HttpEndpoint
{
private function get(
#[Parameter(ParameterLocation::LOCATION_QUERY]
MyParameter $parameter
@nezaniel
nezaniel / HttpEndpoint.php
Created March 12, 2024 14:17
Http Endpoint
<?php
declare(strict_types=1);
use GuzzleHttp\Psr7\Utils;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
abstract class HttpEndpoint
{
<?php
namespace My\Package\Application;
/* *
* This script belongs to the Neos Flow package "My.Package". *
* */
use Neos\Flow\Annotations as Flow;
use Neos\Flow\Persistence\Doctrine\PersistenceManager;
use Neos\Media\Domain\Model\ImageInterface;
@nezaniel
nezaniel / composer.json
Last active February 23, 2018 16:14
neos dev distribution setup
"require": {
"neos/neos-development-collection": "@dev",
"neos/flow-development-collection": "@dev",
"neos/event-sourcing": "@dev",
"neos/demo": "dev-master",
"neos/flow-log": "@dev",
"neos/neos-ui": "~1.0.0",
"neos/neos-ui-compiled": "~1.0.0",
"neos/party": "@dev",
Feature: You name it
Background:
Given I have the following content dimensions:
| Identifier | Default | Values | Generalizations |
| language | en | en, de, fr, it | |
| country | int | int, eu, de, ch, gb, us | de->eu->int, ch->int, gb->int, us->int |
@nezaniel
nezaniel / gist:a333b95bd06dfa3dc57ce3faacf8c655
Last active August 4, 2017 15:09
Neos Backend Redirection aspect
/**
* The aspect for redirecting asset editors to the media management module
*
* @Flow\Scope("singleton")
* @Flow\Aspect
*/
class BackendRedirectionAspect
{
/**
@nezaniel
nezaniel / php
Created February 22, 2017 10:20
<?php
namespace Neos\ContentRepository\EventSourced\Domain\Model\Content\Event;
/*
* This file is part of the Neos.ContentRepository.EventSourced package.
*
* (c) Contributors of the Neos Project - www.neos.io
*
* This package is Open Source Software. For the full copyright and license
* information, please view the LICENSE file which was distributed with this
"asset": {
"type": "attachment",
"fields": {
"asset": {
"type": "string",
"term_vector":"with_positions_offsets",
"store": true
}
}
}
@nezaniel
nezaniel / TagBasedAssetListImplementation
Created August 12, 2016 09:18
A TagBasedAssetListImplementation for Neos TypoScript 2
class TagBasedImageListImplementation extends TemplateImplementation {
/**
* @Flow\Inject
* @var TagRepository
*/
protected $tagRepository;
/**
* @Flow\Inject
@nezaniel
nezaniel / gist:ff1408ffa3d99e3075b3
Last active August 29, 2015 14:21
Neos Backend xliff provider with configurable override
<?php
namespace TYPO3\Neos\Controller\Backend;
/* *
* This script belongs to the TYPO3 Flow package "TYPO3.Neos". *
* *
* It is free software; you can redistribute it and/or modify it under *
* the terms of the GNU General Public License, either version 3 of the *
* License, or (at your option) any later version. *
* *