public function MediaController::autocomplete in Gutenberg 8.2
Same name and namespace in other branches
- 8 src/Controller/MediaController.php \Drupal\gutenberg\Controller\MediaController::autocomplete()
Get data for autocomplete.
Parameters
\Symfony\Component\HttpFoundation\Request $request: Current request.
Return value
\Symfony\Component\HttpFoundation\JsonResponse The JSON response.
1 string reference to 'MediaController::autocomplete'
File
- src/
Controller/ MediaController.php, line 284
Class
- MediaController
- Returns responses for our image routes.
Namespace
Drupal\gutenberg\ControllerCode
public function autocomplete(Request $request) {
return new JsonResponse($this->mediaService
->getMediaEntityAutoCompleteData($request
->get('search', '')));
}