You are here

RouteSubscriber.php in Smart Date 3.2.x

File

src/Routing/RouteSubscriber.php
View source
<?php

namespace Drupal\smart_date\Routing;

use Drupal\Core\Routing\RouteSubscriberBase;
use Symfony\Component\Routing\RouteCollection;

/**
 * Conditionally provide routing information.
 */
class RouteSubscriber extends RouteSubscriberBase {

  /**
   * Alter existing routes as needed.
   */
  protected function alterRoutes(RouteCollection $collection) {
    if ($route = $collection
      ->get('fullcalendar_view.update_event')) {
      $route
        ->setDefault('_controller', "\\Drupal\\smart_date\\Controller\\FullCalendarController::updateEvent");
    }
  }

}

Classes

Namesort descending Description
RouteSubscriber Conditionally provide routing information.