Skip to content

Instantly share code, notes, and snippets.

{% extends "MyBundle::pagelayout.html.twig" %}
{% block header %}
LKAHDKJHDKSDH
{{ parent() }}
{% endblock %}
parameters:
doctrine:
dbal:
connections:
eng_repository_connection:
driver: pdo_pgsql
host: example
user: user
password: example
<?php
namespace MyBundle\Menu;
use eZ\Publish\API\Repository\LocationService;
use eZ\Publish\Core\MVC\ConfigResolverInterface;
use eZ\Publish\API\Repository\SearchService;
use eZ\Publish\API\Repository\Values\Content\Location;
use eZ\Publish\API\Repository\Values\Content\LocationQuery;
use eZ\Publish\API\Repository\Values\Content\Query;
<?php
namespace Tocom\Bundle\AssociateSiteBundle\SiteAccess\Matcher;
use eZ\Bundle\EzPublishCoreBundle\SiteAccess\Matcher;
use eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\URIElement as BaseMatcher;
use Symfony\Component\HttpFoundation\Request as HttpRequest;
class URIElement extends BaseMatcher implements Matcher
{
/**
<?php
use eZ\Publish\Core\MVC\ConfigResolverInterface;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\Routing\RouterInterface;
use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken;
use Symfony\Component\Security\Core\SecurityContextInterface;
@wizhippo
wizhippo / gist:9d8da6ffeb3dbeb79581
Created July 23, 2014 14:38
ezPublish require login
use eZ\Publish\Core\MVC\ConfigResolverInterface;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\Routing\RouterInterface;
use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken;
use Symfony\Component\Security\Core\SecurityContextInterface;
class RequireUserLoginListener
{
@wizhippo
wizhippo / ConsumerSiteController.php
Last active August 29, 2015 14:03
Example menu based on subtree
<?php
namespace Example\Bundle\ExampleBundle\Controller;
use eZ\Bundle\EzPublishCoreBundle\Controller;
use eZ\Publish\API\Repository\Values\Content\Location;
use eZ\Publish\Core\Pagination\Pagerfanta\ContentSearchAdapter;
use Pagerfanta\Pagerfanta;
use Symfony\Component\HttpFoundation\Response;