Skip to content

Instantly share code, notes, and snippets.

View doMynation's full-sized avatar

Dominique Sarrazin doMynation

View GitHub Profile
@doMynation
doMynation / lead.html.twig
Created March 13, 2018 18:03
Twig example
{% extends '@shared/layouts/print-layout.html.twig' %}
{% block css %}
<link href="{{ cssLink('printv2') }}" rel="stylesheet" type="text/css"/>
{% endblock %}
{% block content %}
<table width="100%">
<tr>
<td><img src="{{ img('logo_sdp.png') }}" style="width:180px"/></td>
@doMynation
doMynation / BasicCommandBus.php
Created December 17, 2015 23:31
BasicCommandBus
<?php
namespace Framework\Bus;
use Interop\Container\ContainerInterface;
final class BasicCommandBus implements CommandBusInterface
{
/**
@doMynation
doMynation / test.php
Last active September 30, 2015 15:51
Filtering a PersistentCollection and then persist the changes.
<?php
// ----------- This is a method part of the Order entity, located in Order.php ---------------
/**
* Rejects all attributes with the provided code from the order.
*
* @param string $code
*/
public function rejectAttribute($code)
{
$this->attributes = $this->attributes->filter(function ($attribute) use ($code) {
@doMynation
doMynation / .vimrc
Created August 25, 2015 04:43
.vimrc
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
"Plugin 'tpope/vim-fugitive'
Plugin 'scrooloose/nerdtree'
Plugin 'Shougo/neocomplete.vim'