public function FirstEntryFinalMatcher::setCollection

Sets the route collection this matcher should use.

Parameters

\Symfony\Component\Routing\RouteCollection $collection: The collection against which to match.

Return value

\Drupal\Core\Routing\FinalMatcherInterface The current matcher.

Overrides FinalMatcherInterface::setCollection

File

drupal/core/lib/Drupal/Core/Routing/FirstEntryFinalMatcher.php, line 37
Definition of Drupal\Core\Routing\FirstEntryFinalMatcher.

Class

FirstEntryFinalMatcher
Final matcher that simply returns the first item in the remaining routes.

Namespace

Drupal\Core\Routing

Code

public function setCollection(RouteCollection $collection) {
  $this->routes = $collection;
  return $this;
}