You are here

public function RngRouteEnhancer::enhance in RNG - Events and Registrations 8

Same name and namespace in other branches
  1. 8.2 src/Routing/Enhancer/RngRouteEnhancer.php \Drupal\rng\Routing\Enhancer\RngRouteEnhancer::enhance()
  2. 3.x src/Routing/Enhancer/RngRouteEnhancer.php \Drupal\rng\Routing\Enhancer\RngRouteEnhancer::enhance()

File

src/Routing/Enhancer/RngRouteEnhancer.php, line 24

Class

RngRouteEnhancer
Route enhancer for RNG.

Namespace

Drupal\rng\Routing\Enhancer

Code

public function enhance(array $defaults, Request $request) {
  $event_entity_type = $defaults['event'];
  if (isset($defaults[$event_entity_type])) {
    $rng_event = $defaults[$event_entity_type];
    $defaults['rng_event'] = $rng_event;
  }
  return $defaults;
}