/** * @return ContactForm */ public function createForm(Contact $contact = null) { $contact = $contact ? $contact : new Contact(); $this->form = $this->serviceLocator->get('AddressBook\\Form\\Contact'); $this->form->bind($contact); return $this->form; }