Skip to content

Instantly share code, notes, and snippets.

View wouterj's full-sized avatar

Wouter de Jong wouterj

View GitHub Profile
doctrine_phpcr:
odm:
auto_mapping: true
/*
This source is shared under the terms of LGPL 3
www.gnu.org/licenses/lgpl.html
You are free to use the code in Commercial or non-commercial projects
*/
//Set up an associative array
//The keys represent the size of the cake
//The values represent the cost of the cake i.e A 10" cake cost's $35
<!doctype html>
<title>{{ cmfMainContent.title }}</title>
<h1>{{ cmfMainContent.title }}</h1>
{# added cmf_embed_blocks filter
{{ cmfMainContent.body|raw|cmf_embed_blocks }}
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services">
<config xmlns="http://symfony.com/schema/dic/framework_extra">
<router annotations="true" />
<request converters="true" />
<view annotations="true" />
<cache annotations="true" />
</config>
</container>
<?php
namespace Wj\ForumBundle\Document;
use Doctrine\ODM\PHPCR\Mapping\Annotations as PHPCR;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @PHPCR\Document(referenceable=true)
*/
<?php
// ...
class MyAwesomeController extends Controller
{
public function uselessAction(Request $request)
{
$user = new User();
@wouterj
wouterj / f.php
Last active December 31, 2015 04:49
<?php
/**
* Implementation of FooInterface.
*/
class FooClass implements FooInterface
{
/**
* @var array
*/
@wouterj
wouterj / README.md
Last active December 31, 2015 07:49 — forked from weaverryan/README.md

It's a Doc Hack Day!

Welcome! No matter what you're level of Symfony or how you feel about your English (I'm sure it's just fine), we have plenty of things we need help with! This document will guide you through everything:

Where are we meeting?

We're meeting on Freenode in the #symfony-docs channel. Come hang out!

What can I work on?

<?php
// inside tests
$event = \Mockery::mock('Wj\ShiftSymfonyBundle\Event\RequestEvent');
$event->shouldReceive('getRequest')
->atLeast()->once();
// the class
class RequestEvent
{
<?php
$root
->fixXmlConfig('path')
->children()
->arrayNode('paths')
->beforeNormalization()
->ifString()
->then(function ($v) {
return array($v);