Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [Symfony]Admin Generator
dtrevo
post
Post #1





Grupa: Zarejestrowani
Postów: 32
Pomógł: 0
Dołączył: 5.12.2008

Ostrzeżenie: (0%)
-----


Zainstalowałem Panel Admina, jak chce dodać, albo zedytowac jakieś dane wyskakuje taki błąd:



Fatal error: Class UzytkownikForm contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (sfFormPropel::getModelName) in /var/www/probaa/lib/form/UzytkownikForm.class.php on line 12



Oto plik UzytkownikForm.class.php:

  1. <?php
  2.  
  3. /**
  4.  * Uzytkownik form.
  5.  *
  6.  * @package    nowy
  7.  * @subpackage form
  8.  * @author     Your name here
  9.  * @version    SVN: $Id: sfPropelFormTemplate.php 10377 2008-07-21 07:10:32Z dwhittle $
  10.  */
  11.  
  12. class UzytkownikForm extends BaseFormPropel
  13. {
  14.  public function configure()
  15.  {
  16.      $this->setWidgets(array(
  17.           'login'=> new sfWidgetFormInput(),
  18.           'haslo'=> new sfWidgetFormInputPassword(),
  19.           'powtorz'=> new sfWidgetFormInputPassword(),
  20.           'mail'=> new sfWidgetFormInput(),
  21.           ));
  22.  
  23.  
  24.       $this->setValidators(array(
  25.        'login'    => new sfValidatorString(array('required' => true), array('required' => 'Musisz wypełnić te pole!')),
  26.        'haslo' => new sfValidatorString(array('required' => true , 'min_length' => 6), array('required' => 'Te Pole jest obowiązkowe', 'min_length' => 'Dla twojego bezpieczeństwa, hasło powinno miec przynajmniej 6 znaków.')),
  27.        'powtorz' => new sfValidatorString(array('required' => true , 'min_length' => 6), array('required' => 'Te Pole jest obowiązkowe')),
  28.        'mail'   => new sfValidatorEmail(array(), array('invalid' => 'The email address is invalid.', 'required' => 'To pole jest obowiązkowe.'))));
  29. $this->validatorSchema->setPostValidator(new sfValidatorAnd(
  30.           array(
  31.        new sfValidatorPropelUnique(array('model' => 'Uzytkownik', 'column' => 'login'), array('invalid' => 'Taki login juz istnieje')),
  32.        new sfValidatorSchemaCompare('powtorz', '==', 'haslo', array(), array('invalid' => 'Different passwords'))
  33.   )));
  34.  
  35.  
  36.   }
  37.  
  38. }
  39. ?>


Ten post edytował dtrevo 13.06.2009, 12:55:36
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
destroyerr
post
Post #2





Grupa: Zarejestrowani
Postów: 879
Pomógł: 189
Dołączył: 14.06.2006
Skąd: Bytom

Ostrzeżenie: (0%)
-----


Bo nie znasz php i dlatego nie rozumiesz błędu.
Co innego, że nie wiem gdzie przeczytałeś, że musi dziedziczyć po sfFormPropel. Jak już to po BaseUzytkownikForm, ale tak właśnie było zaraz po wygenerowaniu.
Jeśli możesz to opisz co zrobiłeś.
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 8.10.2025 - 20:24