Q
Q
Qixing2015-01-30 02:38:33
symfony
Qixing, 2015-01-30 02:38:33

How to change GET format in symfony query?

Good afternoon.
I'm making a search form on the site. GET requests are relevant. After sumbit in the url line I see

app_dev.php/catalog/1?MyBundleItemFilter%5Bmaker%5D=1&MyBundleItemFilter%5BmainCategory%5D=&MyBundleItemFilter%5Bsearch%5D=

How can I change the format MyBundleItemFilter%5Bmaker%5Dand remove extra fields like search?.
Field Formation Example
->add(
                'maker',
                'entity',
                array(
                    'class' => 'MyBundle:MyBundleItemMaker',
                    'property' => 'name',
                    'required' => false,
                    'data' => null,
                    'empty_value' => '-- Все --',
                )
            )

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jaxel, 2015-01-30
@Qixing

From the code it is not entirely clear where the extra fields come from. Your field type is entity. Accordingly, the essence is transferred. If you just want a key-value, make a different field type, like choice.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question