Skip to content

Instantly share code, notes, and snippets.

Avatar

Pascal Borreli pborreli

  • Les-Tilleuls.coop
  • Oujda, Morocco
  • Twitter @pborreli
View GitHub Profile
@pborreli
pborreli / ProjectConfiguration.class.php
Created Sep 16, 2010
disable drop-db task in symfony console
View ProjectConfiguration.class.php
<?php
class ProjectConfiguration extends sfProjectConfiguration
{
public function setup()
{
$this->dispatcher->connect('command.filter_options', array($this, 'filterCommandOptions'));
}
/**
@pborreli
pborreli / Configuration.class.php
Created Sep 14, 2010
how to remove "with_empty" checkbox for all generated formFilters in symfony 1.4
View Configuration.class.php
<?php
class xxxConfiguration extends sfXxxConfiguration
{
public function setup()
{
$this->dispatcher->connect('command.filter_options', array($this, 'filterCommandOptions'));
}
@pborreli
pborreli / Configuration.class.php
Created Sep 13, 2010
how to replace a specific widget by another for all generated forms in symfony
View Configuration.class.php
<?php
class xxxConfiguration extends sfXxxConfiguration
{
public function setup()
{
$this->dispatcher->connect('command.filter_options', array($this, 'filterCommandOptions'));
}
@pborreli
pborreli / *Configuration.class.php
Created Sep 1, 2010
removing admin gen css files at app/project level
View *Configuration.class.php
<?php
class privateConfiguration extends sfApplicationConfiguration {
public function configure() {
$this->dispatcher->connect('view.configure_format', array($this, 'listenToViewConfigureFormatEvent'));
}
@pborreli
pborreli / import
Created May 10, 2010
Dealing with mass import in doctrine/pdo using pcntl_fork
View import
<?php
class importTask extends sfTask
{
protected function execute($arguments = array(), $options = array())
{
$xml = simplexml_load_file('file');
$users = array();
foreach ($xml->users as $user)
{
@pborreli
pborreli / Configuration.class.php
Created Apr 28, 2010
adding ":" to all labels and "*" to all required fields inside symfony 1.3+ forms
View Configuration.class.php
<?php
class privateConfiguration extends sfApplicationConfiguration
{
public function configure()
{
$this->dispatcher->connect('form.post_configure', array($this, 'listenToFormPostConfigure'));
}
/**
View frontendConfiguration.class.php
<?php
/**
The modifications to this class caches in APC all the file system scans that symfony does to find plugins paths, configurations files, modules, etc.
**/
class frontendConfiguration extends sfApplicationConfiguration
{