Permalink
Browse files

remove unneeded forms

  • Loading branch information...
1 parent 81aad9e commit 6344187e88a1630fc62b7395e33923d5ff7d956d @iampersistent iampersistent committed Feb 7, 2013
@@ -1,41 +0,0 @@
-<?php
-
-namespace Vespolina\Form\Partner;
-
-use Symfony\Component\Form\AbstractType;
-use Symfony\Component\Form\FormBuilderInterface;
-use Symfony\Component\OptionsResolver\OptionsResolverInterface;
-
-class AddressType extends AbstractType
-{
- public function buildForm(FormBuilderInterface $builder, array $options)
- {
- $builder
- ->add('type')
- ->add('street')
- ->add('number')
- ->add('numbersuffix')
- ->add('zipcode')
- ->add('city')
- ->add('state')
- ->add('country')
- ;
- }
-
- /**
- * @param \Symfony\Component\OptionsResolver\OptionsResolverInterface $resolver
- */
- public function setDefaultOptions(OptionsResolverInterface $resolver) {
- $resolver->setDefaults(array(
- 'data_class' => 'Vespolina\Entity\Partner\Address'
- ));
- }
-
- /**
- * @return string
- */
- public function getName()
- {
- return 'vespolina_partner_address';
- }
-}
@@ -1,35 +0,0 @@
-<?php
-
-namespace Vespolina\Form\Partner;
-
-use Symfony\Component\Form\AbstractType;
-use Symfony\Component\Form\FormBuilderInterface;
-use Symfony\Component\OptionsResolver\OptionsResolverInterface;
-
-class ContactType extends AbstractType
-{
- public function buildForm(FormBuilderInterface $builder, array $options)
- {
- $builder
- ->add('email')
- ->add('phone')
- ;
- }
-
- /**
- * @param \Symfony\Component\OptionsResolver\OptionsResolverInterface $resolver
- */
- public function setDefaultOptions(OptionsResolverInterface $resolver) {
- $resolver->setDefaults(array(
- 'data_class' => 'Vespolina\Entity\Partner\Contact'
- ));
- }
-
- /**
- * @return string
- */
- public function getName()
- {
- return 'vespolina_partner_contact';
- }
-}
@@ -1,36 +0,0 @@
-<?php
-
-namespace Vespolina\Form\Partner;
-
-use Symfony\Component\Form\AbstractType;
-use Symfony\Component\Form\FormBuilderInterface;
-use Symfony\Component\OptionsResolver\OptionsResolverInterface;
-
-class OrganisationDetailsType extends AbstractType
-{
- public function buildForm(FormBuilderInterface $builder, array $options)
- {
- $builder
- ->add('name')
- ->add('category')
- ->add('employees')
- ;
- }
-
- /**
- * @param \Symfony\Component\OptionsResolver\OptionsResolverInterface $resolver
- */
- public function setDefaultOptions(OptionsResolverInterface $resolver) {
- $resolver->setDefaults(array(
- 'data_class' => 'Vespolina\Entity\Partner\OrganisationDetails'
- ));
- }
-
- /**
- * @return string
- */
- public function getName()
- {
- return 'vespolina_partner_organisation_details';
- }
-}
@@ -1,64 +0,0 @@
-<?php
-
-namespace Vespolina\Form\Partner;
-
-use Symfony\Component\Form\AbstractType;
-use Symfony\Component\Form\FormBuilderInterface;
-use Symfony\Component\OptionsResolver\OptionsResolverInterface;
-use Vespolina\Entity\Partner\PaymentProfile;
-
-class PartnerType extends AbstractType
-{
- public function buildForm(FormBuilderInterface $builder, array $options)
- {
- $builder
- ->add('name')
- ->add('type')
- ->add('currency')
- ->add('language')
- ->add('paymentTerms')
- ->add('personalDetails', new PersonalDetailsType())
- ->add('organisationDetails', new OrganisationDetailsType())
- ->add('primaryContact', new ContactType())
- ->add('addresses', 'collection', array(
- 'type' => new AddressType(),
- 'allow_add' => true,
- 'allow_delete' => true,
- 'by_reference' => false,
- 'options' => array(
- 'required' => false,
- 'attr' => array('class' => 'license-box')
- )
- ))
- ->add('paymentProfileType', 'choice', array(
- 'label' => 'Payment Method',
- 'choices' => array_combine(PaymentProfile::$validTypes, PaymentProfile::$validTypes),
- 'required' => true,
- 'multiple' => false,
- 'expanded' => true,
- ))
- ;
-
- if (isset($options['paymentProfileFormTypeClass'])) {
- $builder->add('paymentProfile', new $options['paymentProfileFormTypeClass']);
- }
- }
-
- /**
- * @param \Symfony\Component\OptionsResolver\OptionsResolverInterface $resolver
- */
- public function setDefaultOptions(OptionsResolverInterface $resolver) {
- $resolver->setDefaults(array(
- 'data_class' => 'Vespolina\Entity\Partner\Partner',
- 'paymentProfileFormTypeClass' => false
- ));
- }
-
- /**
- * @return string
- */
- public function getName()
- {
- return 'vespolina_partner_partner';
- }
-}
@@ -1,39 +0,0 @@
-<?php
-
-namespace Vespolina\Form\Partner;
-
-use Symfony\Component\Form\AbstractType;
-use Symfony\Component\Form\FormBuilderInterface;
-use Symfony\Component\OptionsResolver\OptionsResolverInterface;
-
-class PaymentProfileCreditCardType extends AbstractType
-{
- public function buildForm(FormBuilderInterface $builder, array $options)
- {
- $builder
- ->add('address')
- ->add('expiration', 'date', array(
- 'days' => array(1),
- ))
- ->add('cardType')
- ->add('cardNumber')
- ;
- }
-
- /**
- * @param \Symfony\Component\OptionsResolver\OptionsResolverInterface $resolver
- */
- public function setDefaultOptions(OptionsResolverInterface $resolver) {
- $resolver->setDefaults(array(
- 'data_class' => 'Vespolina\Entity\Partner\PaymentProfileType\CreditCard'
- ));
- }
-
- /**
- * @return string
- */
- public function getName()
- {
- return 'vespolina_partner_payment_profile_credit_card';
- }
-}
@@ -1,37 +0,0 @@
-<?php
-
-namespace Vespolina\Form\Partner;
-
-use Symfony\Component\Form\AbstractType;
-use Symfony\Component\Form\FormBuilderInterface;
-use Symfony\Component\OptionsResolver\OptionsResolverInterface;
-
-class PaymentProfileInvoiceType extends AbstractType
-{
- public function buildForm(FormBuilderInterface $builder, array $options)
- {
- $builder
- ->add('dummy', 'text', array(
- 'label' => 'This is form for invoice',
- 'mapped' => false
- ))
- ;
- }
-
- /**
- * @param \Symfony\Component\OptionsResolver\OptionsResolverInterface $resolver
- */
- public function setDefaultOptions(OptionsResolverInterface $resolver) {
- $resolver->setDefaults(array(
- 'data_class' => 'Vespolina\Entity\Partner\PaymentProfileType\Invoice'
- ));
- }
-
- /**
- * @return string
- */
- public function getName()
- {
- return 'vespolina_partner_payment_profile_invoice';
- }
-}
@@ -1,38 +0,0 @@
-<?php
-
-namespace Vespolina\Form\Partner;
-
-use Symfony\Component\Form\AbstractType;
-use Symfony\Component\Form\FormBuilderInterface;
-use Symfony\Component\OptionsResolver\OptionsResolverInterface;
-
-class PersonalDetailsType extends AbstractType
-{
- public function buildForm(FormBuilderInterface $builder, array $options)
- {
- $builder
- ->add('initials')
- ->add('firstname')
- ->add('prefix')
- ->add('lastname')
- ->add('nationalIdentificationNumber')
- ;
- }
-
- /**
- * @param \Symfony\Component\OptionsResolver\OptionsResolverInterface $resolver
- */
- public function setDefaultOptions(OptionsResolverInterface $resolver) {
- $resolver->setDefaults(array(
- 'data_class' => 'Vespolina\Entity\Partner\PersonalDetails'
- ));
- }
-
- /**
- * @return string
- */
- public function getName()
- {
- return 'vespolina_partner_personal_details';
- }
-}

0 comments on commit 6344187

Please sign in to comment.