Sample User repository method that return all user names in an array:
/**
* Find user names
*
* @return array
*/
public function findAllNames()
<?php | |
function showDiff($year, $month, $day) | |
{ | |
$sentence = []; | |
$comma = $this->translator->trans('diff.comma'); | |
$and = $this->translator->trans('diff.and'); | |
if ($year) { | |
$sentence[] = $this->translator->transChoice('diff.year', $year, array('year' => $year)); |
[ | |
{ "keys": ["super+)"], "command": "indent" }, | |
{ "keys": ["super+("], "command": "unindent" } | |
] |
.table { | |
.sorted { | |
.asc:before, | |
.desc:before { | |
content: ""; | |
margin-right: 5px; | |
.caret(); | |
} | |
.asc:before { | |
border-top: 0; |
<?php | |
namespace Acme\DemoBundle\Twig; | |
use Symfony\Component\PropertyAccess\PropertyAccess; | |
use Doctrine\Common\Inflector\Inflector; | |
class ChoiceExtension extends \Twig_Extension | |
{ | |
/** |
.table-behaviors { | |
display: table /* <table> */ | |
display: table-cell /* <td> */ | |
display: table-row /* <tr> */ | |
display: table-column /* <col> */ | |
display: table-column-group /* <colgroup> */ | |
display: table-footer-group /* <tfoot> */ | |
display: table-header-group /* <thead> */ | |
} |
{% extends "form_div_layout.html.twig" %} | |
{% block form_row %} | |
{% spaceless %} | |
<div> | |
{{ form_label(form) }} | |
{{ form_errors(form) }} | |
{{ form_widget(form) }} |
var a = parseFloat(""); | |
alert(typeof(a)); // "Number"; | |
alert(a); // "NaN" a.k.a. Not a Number; |
function Queriable (form, subset, queryKey, callback, labels) | |
{ | |
if (form.length === 1 && subset.length === 1) { | |
this.labels = typeof(labels) != "undefined" ? labels : {}; | |
this.statement = []; | |
this.form = form; | |
this.subset = subset; |
{# template.html.twig #} | |
<h1>Mon grand titre </h1> | |
{% embed "user.html.twig" %} | |
{% block titre %} | |
<h2>Mon titre</h2> | |
{% endblock %} | |
{% block bottom %} |