Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
novicell/dds_editors / src / Routing / DDSEditorsRouteSubscriber.php
Size: Mime:
<?php

namespace Drupal\dds_editors\Routing;

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

/**
 * Class DDSEditorRouteSubscriber
 *
 * @package Drupal\dds_editors\Routing
 */
class DDSEditorsRouteSubscriber extends RouteSubscriberBase {

  /**
   * {@inheritdoc}
   */
  protected function alterRoutes(RouteCollection $collection)
  {
    if($route = $collection->get('entity.user.edit_form')) {
      $route->setRequirement('_custom_access', 'Drupal\dds_editors\Access\DDSEditorsAccessCheck::accessUserEdit');
    }
  }
}