implementation of customFieldBundle

This commit is contained in:
2014-10-29 16:43:13 +01:00
parent 2254acd8ee
commit 26a0b1e056
27 changed files with 902 additions and 97 deletions

View File

@@ -18,21 +18,24 @@ interface CustomFieldInterface
* @param \CL\CustomFieldsBundle\CustomField\CustomField $customField
* @return \Symfony\Component\Form\FormTypeInterface the form type
*/
public function buildFormType(FormBuilderInterface $builder, CustomField $customField);
public function buildForm(FormBuilderInterface $builder, CustomField $customField);
/**
* transform the value into a format that can be stored in DB
*
* @param type $value
* @param mixed $value
* @param \CL\CustomFieldsBundle\CustomField\CustomField $customField
*/
public function transformToEntity($value, CustomField $customField);
public function serialize($value, CustomField $customField);
/**
* Transform the representation of the value, stored in db, into the
* value which may be used in the process.
*
* @param type $value
* @param mixed $value
* @param \CL\CustomFieldsBundle\CustomField\CustomField $customField
*/
public function transformFromEntity($value, CustomField $customField);
public function deserialize($serialized, CustomField $customField);
/**
*
@@ -42,4 +45,13 @@ interface CustomFieldInterface
public function render($value, CustomField $customField);
public function getName();
/**
* return a formType which allow to edit option for the custom type.
* This FormType is shown in admin
*
* @param \CL\CustomFieldsBundle\CustomField\FormBuilderInterface $builder
* @return \Symfony\Component\Form\FormTypeInterface|null the form type
*/
public function buildOptionsForm(FormBuilderInterface $builder);
}