You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.
Hi, This is my first time use this Bundle and English not my native language so I'm sorry for my mistakes.
I create my own FilterType and extend Basic filter type of this bundle ...
When I use my filtertype in FormFilterType, form type not work and querybuilder not change ...
But when use basic formfiltertype instead of my filtertype everything is fine ...
Where is my mistake?
Update:
Why I need to override types?
I have several entity and all of them has Id , TrackingNumber ...
I need to define label or other options in one place and use that in all of entityFilters ...
class RequestFilterType extends AbstractType
{
/**
* {@inheritdoc}
*
* @param FormBuilderInterface $builder
* @param array $options
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
parent::buildForm($builder, $options);
$builder
->add('trackingNumber', TrackingNumberFilterType::class)
}
/**
* {@inheritdoc}
*
* @return null|string
*/
public function getParent()
{
return FormFilterType::class;
}
/**
* {@inheritdoc}
*
* @return null|string
*/
public function getBlockPrefix()
{
return 'assessment_request_filter';
}
}
___________________________
class TrackingNumberFilterType extends AbstractType
{
/**
* @param FormBuilderInterface $builder
* @param array $options
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
parent::buildForm($builder, $options);
$builder
->add('trackingNumber', NumberFilterType::class, array(
'label' => false,
'attr' => array(
'placeholder' => 'narmafzam.fields.trackingNumber'
)
));
}
/**
* {@inheritdoc}
*
* @return null|string
*/
public function getBlockPrefix()
{
return 'narmafzam_tracking_number_filter';
}
}
The text was updated successfully, but these errors were encountered:
Hi, This is my first time use this Bundle and English not my native language so I'm sorry for my mistakes.
I create my own FilterType and extend Basic filter type of this bundle ...
When I use my filtertype in FormFilterType, form type not work and querybuilder not change ...
But when use basic formfiltertype instead of my filtertype everything is fine ...
Where is my mistake?
Update:
Why I need to override types?
I have several entity and all of them has Id , TrackingNumber ...
I need to define label or other options in one place and use that in all of entityFilters ...
The text was updated successfully, but these errors were encountered: