Created
May 23, 2011 19:30
-
-
Save eminetto/987369 to your computer and use it in GitHub Desktop.
PessoaForm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
abstract class PessoaForm extends Zend_Form { | |
public function __construct($options = null) { | |
parent::__construct($options); | |
$this->generate(); | |
} | |
private function generate() { | |
$this->setName('Login'); | |
$username = new Zend_Form_Element_Text('username'); | |
$username->setLabel('Login')->setRequired(true)->addFilter('StripTags')->addValidator('NotEmpty'); | |
$password = new Zend_Form_Element_Password('password'); | |
$password->setLabel('Senha')->setRequired(true)->addFilter('StripTags')->addValidator('NotEmpty'); | |
$this->addElements(array($username, $password)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment