Commit d4e6b3a6 authored by wilhelmhb's avatar wilhelmhb

forms for the entities

parent a3985663
<?php
namespace ApiBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
class PsBoxType extends AbstractType
{
/**
* @param FormBuilderInterface $builder
* @param array $options
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('idHive')
->add('idClient')
->add('serialNumber')
->add('version')
->add('note')
->add('active')
->add('dateAdd')
->add('dateUpd')
;
}
/**
* @param OptionsResolverInterface $resolver
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(array(
'data_class' => 'ApiBundle\Entity\PsBox'
));
}
/**
* @return string
*/
public function getName()
{
return 'apibundle_psbox';
}
}
<?php
namespace ApiBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
class PsClientType extends AbstractType
{
/**
* @param FormBuilderInterface $builder
* @param array $options
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('idClientType')
->add('idEmployee')
->add('idCustomer')
->add('name')
->add('telephone')
->add('note')
->add('active')
->add('dateAdd')
->add('dateUpd')
;
}
/**
* @param OptionsResolverInterface $resolver
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(array(
'data_class' => 'ApiBundle\Entity\PsClient'
));
}
/**
* @return string
*/
public function getName()
{
return 'apibundle_psclient';
}
}
<?php
namespace ApiBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
class PsCustomNoteCustomerType extends AbstractType
{
/**
* @param FormBuilderInterface $builder
* @param array $options
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('id_custom_note')
->add('id_hive')
->add('date_add')
;
}
/**
* @param OptionsResolverInterface $resolver
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(array(
'data_class' => 'ApiBundle\Entity\PsCustomNoteCustomer'
));
}
/**
* @return string
*/
public function getName()
{
return 'apibundle_pscustomnotecustomer';
}
}
<?php
namespace ApiBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
class PsCustomNoteType extends AbstractType
{
/**
* @param FormBuilderInterface $builder
* @param array $options
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('id_customer')
->add('name')
->add('message')
->add('level')
;
}
/**
* @param OptionsResolverInterface $resolver
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(array(
'data_class' => 'ApiBundle\Entity\PsCustomNote'
));
}
/**
* @return string
*/
public function getName()
{
return 'apibundle_pscustomnote';
}
}
<?php
namespace ApiBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Symfony\Component\Form\CallbackTransformer;
use Symfony\Component\Form\Exception\TransformationFailedException;
class PsCustomerType extends AbstractType
{
/**
* @param FormBuilderInterface $builder
* @param array $options
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('idShopGroup')
->add('idShop')
->add('idGender')
->add('idDefaultGroup')
->add('idLang')
->add('idRisk')
->add('company')
->add('siret')
->add('ape')
->add('firstname')
->add('lastname')
->add('email')
->add('password')
->add('lastPasswdGen')
->add('birthday')
->add('newsletter')
->add('ipRegistrationNewsletter')
->add('newsletterDateAdd')
->add('optin')
->add('website')
->add('outstandingAllowAmount')
->add('showPublicPrices')
->add('maxPaymentDays')
->add('secureKey')
->add('note')
->add('active')
->add('isGuest')
->add('deleted')
->add('dateAdd')
->add('dateUpd')
->add('hivesNumber')
->add('hivesLostNumber')
->add('harvest')
->add('startYear')
->add('departament')
->add('registrationNumber')
->add('transhumance')
->add('structure')
->add('telephone')
;
}
/**
* @param OptionsResolverInterface $resolver
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(array(
'data_class' => 'ApiBundle\Entity\PsCustomer'
));
}
/**
* @return string
*/
public function getName()
{
return 'apibundle_pscustomer';
}
}
<?php
namespace ApiBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
class PsDefaultNoteCustomerType extends AbstractType
{
/**
* @param FormBuilderInterface $builder
* @param array $options
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('id_default_note')
->add('id_hive')
->add('id_customer')
->add('date_add')
;
}
/**
* @param OptionsResolverInterface $resolver
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(array(
'data_class' => 'ApiBundle\Entity\PsDefaultNoteCustomer'
));
}
/**
* @return string
*/
public function getName()
{
return 'apibundle_psdefaultnotecustomer';
}
}
<?php
namespace ApiBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
class PsDefaultNoteType extends AbstractType
{
/**
* @param FormBuilderInterface $builder
* @param array $options
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('name')
->add('message')
->add('level')
;
}
/**
* @param OptionsResolverInterface $resolver
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(array(
'data_class' => 'ApiBundle\Entity\PsDefaultNote'
));
}
/**
* @return string
*/
public function getName()
{
return 'apibundle_psdefaultnote';
}
}
<?php
namespace ApiBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
class PsHiveGroupType extends AbstractType
{
/**
* @param FormBuilderInterface $builder
* @param array $options
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('idClient')
->add('name')
->add('note')
->add('harvest')
->add('notes')
->add('dateAdd')
->add('dateUpd')
;
}
/**
* @param OptionsResolverInterface $resolver
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(array(
'data_class' => 'ApiBundle\Entity\PsHiveGroup'
));
}
/**
* @return string
*/
public function getName()
{
return 'apibundle_pshivegroup';
}
}
<?php
namespace ApiBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Symfony\Component\Form\Extension\Core\Type\DateTimeType;
class PsHiveType extends AbstractType
{
/**
* @param FormBuilderInterface $builder
* @param array $options
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('idClient')
->add('name')
->add('note')
->add('latitude')
->add('longitude')
->add('active')
->add('hiveType')
->add('beesType')
->add('material')
->add('support')
->add('state')
->add('harvest')
->add('notes')
->add('dateAdd')
->add('dateUpd')
->add('idHiveGroup')
;
}
/**
* @param OptionsResolverInterface $resolver
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(array(
'data_class' => 'ApiBundle\Entity\PsHive'
));
}
/**
* @return string
*/
public function getName()
{
return 'apibundle_pshive';
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment