You are here

public function MediaController::search in Gutenberg 8

Same name and namespace in other branches
  1. 8.2 src/Controller/MediaController.php \Drupal\gutenberg\Controller\MediaController::search()

Searches for files.

Parameters

\Symfony\Component\HttpFoundation\Request $request: The request.

string $type: The MIME type search string.

string $search: The filename search string.

Return value

\Symfony\Component\HttpFoundation\JsonResponse The JSON response.

1 string reference to 'MediaController::search'
gutenberg.routing.yml in ./gutenberg.routing.yml
gutenberg.routing.yml

File

src/Controller/MediaController.php, line 211

Class

MediaController
Returns responses for our image routes.

Namespace

Drupal\gutenberg\Controller

Code

public function search(Request $request, string $type = '', string $search = '') {
  return new JsonResponse($this->mediaService
    ->search($request, $type, $search));
}