Skip to content

Instantly share code, notes, and snippets.

Avatar

Florian Klein docteurklein

View GitHub Profile
View gist:344728
propel.targetPackage = lib.model
propel.packageObjectModel = true
propel.project = sfShop
propel.database = mysql
propel.database.driver = mysql
propel.database.url = mysql:dbname=###;host=localhost
propel.database.user = ###
propel.database.password = ###
propel.database.encoding = utf8
View README
HOW TO :
- Déclarer les composants dans modules.yml
- Créer une page (form) et y ajouter le widget Form.
- Créer une sous-page ( edition) de celle citée juste au dessus et y ajouter le widget Edit.
- aller a l'URL : /form/edition?id=1
View update_vendors
git submodule update --recursive \
&& git submodule foreach git checkout master \
&& git submodule foreach git fetch \
View mongodb_panel impl.diff
diff --git a/src/Symfony/Bundle/DoctrineMongoDBBundle/DataCollector/DoctrineMongoDBDataCollector.php b/src/Symfony/Bundle/DoctrineMongoDBBundle/DataCollector/DoctrineMongoDBDataC
index 0574ccf..ec89d40 100644
--- a/src/Symfony/Bundle/DoctrineMongoDBBundle/DataCollector/DoctrineMongoDBDataCollector.php
+++ b/src/Symfony/Bundle/DoctrineMongoDBBundle/DataCollector/DoctrineMongoDBDataCollector.php
@@ -27,6 +27,7 @@ class DoctrineMongoDBDataCollector extends DataCollector
public function collect(Request $request, Response $response, \Exception $exception = null)
{
$this->data['nb_queries'] = $this->logger->getNbQueries();
+ $this->data['queries'] = $this->logger->getQueries();
}
@docteurklein
docteurklein / DoctrineExtensionsBundle.php
Created Nov 15, 2010
Symfony2 DIC: add a Doctrine Listener Subscription
View DoctrineExtensionsBundle.php
class DoctrineExtensionsBundle extends BaseBundle
{
public static function addSubscriber($eventManager, EventSubscriber $subscriber)
{
return $eventManager->addSubscriber($subscriber);
}
}
@docteurklein
docteurklein / ProductController.php
Created Dec 12, 2010
the service factory method
View ProductController.php
<?php
namespace Bundle\ECommerce\ProductBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class ProductController extends Controller
{
public function indexAction($page = 1)
{
View weekly-discussion-14-12-2010.irc.log
**** DÉBUT DU JOURNAL À Tue Dec 14 19:42:03 2010
déc. 14 19:42:25 <inspiran> in typical e-commerce software (and which probably most php'ers would do) is just say 'just update the sales order'
déc. 14 19:42:59 <inspiran> but in lots of business cases, actually in almost all europe companies due to legal constraints, you can not do that
déc. 14 19:43:18 <inspiran> (you are modifying a sales order / invoice which was already sent)
déc. 14 19:43:27 <inspiran> so what do you need to do?
déc. 14 19:43:44 <inspiran> you need to cancel the old sales order and create a new one
déc. 14 19:44:13 <inspiran> (which involves updating the accounting balances twice)
déc. 14 19:44:57 <florian__> yes, I already had to face this kind of problesm
déc. 14 19:45:14 <inspiran> yeah? i am interesting to hear about how you dealt with it
View factories.yml
prod_cli:
routing:
param:
context:
prefix: https://the.url-you-wa.nt
is_secure: true
View symfony-cmf.log
T 1296470968 29* 29Le sujet de #symfony-cmf 29est : https://github.com/symfony-cmf/symfony-cmf/wiki/Architecture || http://cmf.symfony-project.org || making it easier for developers to add CMS functionality to applications built with the Symfony2 PHP framework
T 1296470968 29* 29Sujet de #symfony-cmf 29défini par lsmith!~lsmith@251-74.127-70.tampabay.res.rr.com 29le Wed Nov 17 14:30:08 2010
T 1296471086 18<lsmith> salut florian
T 1296471196 31<florian_klein>30 hello!
T 1296471322 18<Seldaek> hoy
T 1296471438 31<florian_klein>30 hoy :)
T 1296471692 18<dbu> hello
T 1296471766 31<florian_klein>30 Hi david
T 1296477349 19* 19juokaz_ (~Juozas@188-223-12-184.zone14.bethere.co.uk) a rejoint #symfony-cmf
T 1296477373 23* 23juokaz_ est parti (23Read error: Connection reset by peer23)
View validation.xml
<constraint-mapping xmlns="http://www.symfony-project.org/schema/dic/constraint-mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.symfony-project.org/schema/dic/constraint-mapping
http://www.symfony-project.org/schema/dic/services/constraint-mapping-1.0.xsd">
<class name="Test\FileBundle\Entity\File">
<property name="title">
<constraint name="NotBlank">
<option name="message">error.title.empty</option>
</constraint>
You can’t perform that action at this time.