Skip to content

Instantly share code, notes, and snippets.

View bchoquet-heliopsis's full-sized avatar

Benjamin Choquet bchoquet-heliopsis

  • Heliopsis
  • France
View GitHub Profile
@bchoquet-heliopsis
bchoquet-heliopsis / AcmeFormsTutorialBundle.php
Last active August 29, 2015 14:01
Files created for eZFormsBundle tutorial
<?php
// src/Acme/FormsTutorialBundle/AcmeFormsTutorialBundle.php
namespace Acme\FormsTutorialBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class AcmeFormsTutorialBundle extends Bundle
{
}
<?php
//src/Acme/FormBundle/Forms/CustomFormType.php
namespace Acme\FormBundle\Forms;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Acme\FormBundle\Entity\FormData;
<?php
//src/Acme/FormBundle/Controller/FormController.php
namespace Acme\FormBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Acme\FormBundle\Entity\FormData;
use Symfony\Component\HttpFoundation\Request;
class FormController extends Controller
@bchoquet-heliopsis
bchoquet-heliopsis / HelioINIZetaDBFactory.php
Created May 18, 2011 16:48
Helper returning ezcDbHandler From eZPublish database settings
<?php
class HelioINIZetaDBFactory
{
/**
* Database implementations mapping
* Key is eZPublish ImplementationAlias, Value is ezcDbFactory alias
* @var array
*/
private static $map = array(
'mysql' => 'mysql',
@bchoquet-heliopsis
bchoquet-heliopsis / create_ezp_backbone.sh
Created November 18, 2010 09:39
Initialisation d'un dossier comme install de site ezpublish, source déportée en sous-module git
#ajout d'ezpublish dans un sous-module
git submodule add -b stable-4.4 https://github.com/ezsystems/ezpublish.git ezp
#Symlinks sur tous les fichiers sauf settings/ et extension/
for f in $( ls ezp | egrep -i -v "extension|settings|var|config.php-RECOMMENDED|kickstart.ini-dist|LICENSE|README.txt|.htaccess_root"); do
echo "Symlink $f"
ln -s ezp/$f ./$f
done
#Symlinks sur tous les .ini par défaut