root/trunk/lib/form/BaseFormPropel.class.php

Revision 75, 0.6 kB (checked in by nperriault, 5 months ago)

[1.1]:

  • Companies and people modules migrated, with according form classes and templates, and functional test suite
  • Enhanced SymfoniansTestBrowser?
Line 
1 <?php
2 /**
3  * Project base Propel form class.
4  *
5  * @package    form
6  */
7 abstract class BaseFormPropel extends sfFormPropel
8 {
9   /**
10    * Current culture
11    * @var string
12    */
13   protected $culture = null;
14
15   /**
16    * Form setup:
17    *
18    *  - automatically loads the culture from user session
19    *  - defines default form schema formatter
20    */
21   public function setup()
22   {
23     // Culture setup
24     sfLoader::loadHelpers('I18n');
25     $context = sfContext::getInstance();
26     $this->culture = $context->getUser()->getCulture();
27
28     // Default formatter
29     sfWidgetFormSchema::setDefaultFormFormatterName('div');
30   }
31 }
32
Note: See TracBrowser for help on using the browser.