PageForm.class.php 1013 Bytes
Newer Older
Яков's avatar
first  
Яков committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php

/**
 * Page form.
 *
 * @package    sf
 * @subpackage form
 * @author     Atma
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class PageForm extends BasePageForm
{
    public function configure()
    {
        $this->embedI18n(array('ru', 'en'));
        $this->useFields(array('ru', 'en'));

        $this->widgetSchema['ru']['title'] = new sfWidgetFormInputText(array("label" => "Название"), array("size" => 64, "maxlength" => 255, "required" => true));
        $this->widgetSchema['en']['title'] = new sfWidgetFormInputText(array("label" => "Название"), array("size" => 64, "maxlength" => 255, "required" => true));
        $this->widgetSchema['ru']['body'] = new sfWidgetFormTextarea(array("label" => "Текст"), array("class" => "rich", "rows" => 5, "cols" => 70));
        $this->widgetSchema['en']['body'] = new sfWidgetFormTextarea(array("label" => "Текст"), array("class" => "rich", "rows" => 5, "cols" => 70));
    }
}