Created
April 16, 2016 16:09
-
-
Save ad3n/8136b805572ce1c2c278f51700aaf800 to your computer and use it in GitHub Desktop.
AdminBundle Autocomplite
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Util(datePicker=true, autoComplete={"route"="search_donatur", "targetSelector"="donatur"}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
->add('donatur', ChoiceType::class, array( | |
'choices' => array(), | |
'label' => 'label.domain.donatur', | |
'attr' => array( | |
'class' => 'form-control autocomplete donatur', | |
), | |
)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @Route("/search/", name="search_donatur") | |
*/ | |
public function searchAction(Request $request) | |
{ | |
return new JsonResponse(array( | |
array( | |
'id' => 1, | |
'text' => 'A', | |
), | |
array( | |
'id' => 2, | |
'text' => 'B', | |
), | |
) | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment