Skip to content

Instantly share code, notes, and snippets.

@NicolasBadey
NicolasBadey / gist:7991350
Last active December 31, 2015 13:09
Sonata pour l'IIM

##Dans composer.json

    "sonata-project/doctrine-orm-admin-bundle": "dev-master"

puis faire php composer.phar update

##Dans app/appKernel.php ajouter les bundle :

new Sonata\CoreBundle\SonataCoreBundle(),

@joergbasedow
joergbasedow / SonataAdmin Filter Entities by NULL Fields
Last active August 5, 2018 03:28
I'm trying to filter entities by wether a fields value is NULL/NOT NULL/BOTH in SonataAdminBundle. Is there a more concise way?
<?php
// ...
class ProductAdmin extends SonataAdmin
{
// ...
protected function configureDatagridFilters(DatagridMapper $filter)
{
@raphaelstolt
raphaelstolt / redis-glue-test.php
Created May 15, 2010 04:45
Redis installation test script
<?php
define('TEST_KEY', 'are_we_glued');
$redis = new Redis();
try {
$redis->connect('localhost', 6379);
$redis->set(TEST_KEY, 'yes');
$glueStatus = $redis->get(TEST_KEY);
if ($glueStatus) {
$testKey = TEST_KEY;
echo "Glued with the Redis key value store:" . PHP_EOL;