Skip to content

Instantly share code, notes, and snippets.

View janit's full-sized avatar

Jani Tarvainen janit

View GitHub Profile
<?php
use Symfony\Component\ExpressionLanguage\ExpressionLanguage;
$language = new ExpressionLanguage();
$userInfo = array(
'age' => '36',
'country' => 'Lilliput'
);
gulp.task('sass', function() {
return gulp.src('scss/app.scss')
.pipe($.sass({
includePaths: sassPaths
})
.on('error', $.sass.logError))
.pipe($.autoprefixer({
browsers: ['last 2 versions', 'ie >= 9']
}))
ezpublish:
system:
default:
location_view:
full:
blog:
controller: app.controller.blog:listBlogPostsAction
template: full\blog.html.twig
match:
Identifier\ContentType: [blog]
<?php
/**
* @param \eZ\Publish\API\Repository\ContentService $contentService
* @param \eZ\Publish\API\Repository\SearchService $searchService
* @param \eZ\Publish\API\Repository\LocationService $locationService
* @param \eZ\Publish\Core\MVC\ConfigResolverInterface $configResolver
* @param \AppBundle\Criteria\Children $childrenCriteria
* @param int $randomPostsLimit
* @param int $blogPostLimit
parameters:
app.controller.blog.class: AppBundle\Controller\BlogController
services:
app.controller.blog:
class: %app.controller.blog.class%
arguments:
- @ezpublish.api.service.content
- @ezpublish.api.service.search
- @ezpublish.api.service.location
<?php
/**
* Displays the list of blog_post.
*
* @param \eZ\Publish\Core\MVC\Symfony\View\ContentView $view
* @param \Symfony\Component\HttpFoundation\Request $request
*
* @return \Symfony\Component\HttpFoundation\Response
*/
<?php
namespace AppBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Icicle\Coroutine\Coroutine;
use Icicle\Loop;
use Icicle\Awaitable;
<?php
namespace AppBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Icicle\Coroutine\Coroutine;
use Icicle\Loop;
use Icicle\Awaitable;
<?php
$factory = $this->container->get('ktw_database_menu.factory');
$menu = $factory->createItem('root');
$menu->addChild('Home', array('route' => 'homepage'));
$menu->addChild('About Me', array(
'route' => 'page_show',
'routeParameters' => array('id' => 42)));
rollerworks_navigation:
menus:
menu-name:
template: ~ # optional template, used by the Menu builder
items:
item-name: # name of the item, eg. home, products, and such.
label: ~ # Label of the menu-item, this will be translated with the translator_domain
translator_domain: Menus # translator domain for the label
route: { name: ~, parameters: { } } # The route.name can not be empty, parameters is optional
uri: ~ # Alternatively you can use a URI instead of a route