-
-
Save tournasdim/9996981 to your computer and use it in GitHub Desktop.
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 | |
namespace Helloworld\Form; | |
use Zend\Form\Fieldset; | |
class UserAddressFieldset extends Fieldset | |
{ | |
public function __construct() | |
{ | |
parent::__construct('userAddress'); | |
$this->setHydrator(new \Zend\Stdlib\Hydrator\Reflection()); | |
$this->setObject(new \Helloworld\Entity\UserAddress()); | |
$this->add(array( | |
'name' => 'street', | |
'attributes' => array( | |
'type' => 'text', | |
), | |
'options' => array( | |
'label' => 'Ihre Strasse:', | |
) | |
)); | |
$this->add(array( | |
'name' => 'streetNumber', | |
'attributes' => array( | |
'type' => 'text', | |
), | |
'options' => array( | |
'label' => 'Ihre Hausnummer:', | |
) | |
)); | |
$this->add(array( | |
'name' => 'zipcode', | |
'attributes' => array( | |
'type' => 'text', | |
), | |
'options' => array( | |
'label' => 'Ihre Postleitzahl:', | |
) | |
)); | |
$this->add(array( | |
'name' => 'city', | |
'attributes' => array( | |
'type' => 'text', | |
), | |
'options' => array( | |
'label' => 'Ihre Stadt:', | |
) | |
)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment