Skip to content

Instantly share code, notes, and snippets.

View peshi's full-sized avatar

Roland Ekström peshi

  • Peshi AB
  • Sweden
View GitHub Profile
@peshi
peshi / menu.html.twig
Created February 2, 2014 12:26
twbs list-group menu
{% extends 'knp_menu.html.twig' %}
{% macro attributes(attributes) %}
{% for name, value in attributes %}
{%- if value is not none and value is not sameas(false) -%}
{{- ' %s="%s"'|format(name, value is sameas(true) ? name|e : value|e)|raw -}}
{%- endif -%}
{%- endfor -%}
{% endmacro %}
<?php
namespace Acme\DemoBundle\DBAL\Type;
use Doctrine\DBAL\Types\Type;
use Doctrine\DBAL\Platforms\AbstractPlatform;
/**
* Class SemicolonArrayType represents an array of values that will be persisted as a string of semicolon-separated strings.
*