-
Notifications
You must be signed in to change notification settings - Fork 51
Closed
Description
1 | ERROR | [ ] An error occurred during processing; checking has been aborted. The error message was: $stackPtr is not a class member var
| | The error originated in the Drupal.NamingConventions.ValidVariableName sniff on line 41. (Internal.Exception)
Run coding standards checks for this file, which has xfunction
instead of function
:
<?php
namespace Drupal\my_module\Services;
use Drupal\Core\Routing\RouteSubscriberBase;
use Symfony\Component\Routing\RouteCollection;
/**
* Listens to the dynamic route events.
*/
class RouteSubscriber extends RouteSubscriberBase {
/**
* {@inheritdoc}
*/
protected xfunction alterRoutes(RouteCollection $collection) {
// Edit user.
if ($route = $collection->get('entity.user.edit_form')) {
$route->setRequirement('_permission', 'administer users');
}
// View user. Not currently restricted.
if (FALSE && $route = $collection->get('entity.user.canonical')) {
$route->setRequirement('_permission', 'administer users');
}
}
}
Metadata
Metadata
Assignees
Labels
No labels