This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// src/Zm/UserBundle/Entity/User.php | |
namespace Zm\UserBundle\Entity; | |
use FOS\UserBundle\Entity\User as BaseUser; | |
use Doctrine\ORM\Mapping as ORM; | |
/** | |
* @ORM\Entity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Session management | |
# Get session for an easier access | |
$session = $_SESSION[$settings['session']]; | |
$datetime = new \Datetime(); | |
# Saving current page in session history | |
$session['history'][] = array( | |
'page' => $dump->url, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Blabla | |
public function ChangeLanguageAction() | |
{ | |
$request = $this->get('request'); | |
$language = $request->query->get('language'); | |
$userManager = $this->get('fos_user.user_manager'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% for key, flash in app.session.get('flashes') %} | |
{# Affichage #} | |
{{ app.session.set('flashes', '') }} | |
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% for key, val in app.sessio %} | |
{{ key }} => {{ val }} <br /> | |
{% else %} | |
Rien à lister | |
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% set var = '' %} | |
{% if var is not null %} | |
<h1>It's work!</h1> | |
<!-- N'y voit pas de référence à une tribu. Non non. --> | |
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="http://code.jquery.com/jquery-latest.js"></script> | |
<script type="text/javascript" src="{{ asset('js/bootstrap.js') }}"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Array ( | |
category => Array ( | |
link1 => Array ( | |
href => L'attribut « href » du lien en question. | |
id => L'identifiant de l'élément, pour permettre des interactions avancées. | |
label => Le texte (traduis) à afficher. | |
) | |
link2 => Array ( ... ) | |
) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# In a controller | |
$cardTemplateID = // Some logic to get this identifier | |
$infos = // Idem for user infos | |
$links = // Idem for links | |
$HTMLCard = $this->renderView('ZmCardStorageBundle:Cards:' . $cardTemplateID . '.html.twig', array( | |
'infos' => $infos, | |
'links' => $links |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Photos\PhotosBundle\Service; | |
# | |
# Markdown Extra - A text-to-HTML conversion tool for web writers | |
# | |
# PHP Markdown & Extra | |
# Copyright (c) 2004-2008 Michel Fortin | |
# <http://www.michelf.com/projects/php-markdown/> | |
# | |
# Original Markdown |
OlderNewer