/**
* Returns an array of route objects.
*
* @return \Symfony\Component\Routing\Route[]
* An array of route objects.
*/
public function routes() { $routes =
[];
// @todo Decide if /search should continue to redirect to /search/$default,
// or just perform the appropriate search.
if ($default_page =
$this->searchPageRepository->
getDefaultSearchPage()) { $routes['search.view'
] =
new Route( '/search',
[ '_controller' => 'Drupal\search\Controller\SearchController::redirectSearchPage',
'_title' => 'Search',
'entity' =>
$default_page,
],
[ '_entity_access' => 'entity.view',
'_permission' => 'search content',
],
[