Skip to content

Instantly share code, notes, and snippets.

View nezaniel's full-sized avatar

Bernhard Schmitt nezaniel

View GitHub Profile
@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
{
/**
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 / 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",
<?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 / 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
{
@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