diff --git a/core/modules/user/src/Form/UserPermissionsForm.php b/core/modules/user/src/Form/UserPermissionsForm.php index 60acd02..71c3a91 100644 --- a/core/modules/user/src/Form/UserPermissionsForm.php +++ b/core/modules/user/src/Form/UserPermissionsForm.php @@ -10,7 +10,7 @@ use Drupal\Component\Utility\String; use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\Form\FormBase; -use Drupal\user\PermissionManagerInterface; +use Drupal\user\PermissionHandlerInterface; use Drupal\user\RoleStorageInterface; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -20,11 +20,11 @@ class UserPermissionsForm extends FormBase { /** - * The permission manager. + * The permission handler. * - * @var \Drupal\user\PermissionManagerInterface + * @var \Drupal\user\PermissionHandlerInterface */ - protected $permissionManager; + protected $permissionHandler; /** * The role storage. @@ -36,13 +36,13 @@ class UserPermissionsForm extends FormBase { /** * Constructs a new UserPermissionsForm. * - * @param \Drupal\user\PermissionManagerInterface $permission_manager - * The permission manager. + * @param \Drupal\user\PermissionHandlerInterface $permission_handler + * The permission handler. * @param \Drupal\user\RoleStorageInterface $role_storage * The role storage. */ - public function __construct(PermissionManagerInterface $permission_manager, RoleStorageInterface $role_storage) { - $this->permissionManager = $permission_manager; + public function __construct(PermissionHandlerInterface $permission_handler, RoleStorageInterface $role_storage) { + $this->permissionHandler = $permission_handler; $this->roleStorage = $role_storage; } @@ -113,7 +113,7 @@ public function buildForm(array $form, array &$form_state) { ); } - $permissions = $this->permissionManager->getPermissions(); + $permissions = $this->permissionHandler->getPermissions(); $permissions_by_provider = array(); foreach ($permissions as $permission_name => $permission) { $permissions_by_provider[$permission['provider']][$permission_name] = $permission; diff --git a/core/modules/user/src/PermissionHandler.php b/core/modules/user/src/PermissionHandler.php index ef9d6a6..86b60e9 100644 --- a/core/modules/user/src/PermissionHandler.php +++ b/core/modules/user/src/PermissionHandler.php @@ -26,7 +26,7 @@ * * @see hook_permission() */ -class PermissionHandler implements PermissionManagerInterface { +class PermissionHandler implements PermissionHandlerInterface { use StringTranslationTrait; diff --git a/core/modules/user/tests/src/PermissionHandlerTest.php b/core/modules/user/tests/src/PermissionHandlerTest.php index f330c3e..348b767 100644 --- a/core/modules/user/tests/src/PermissionHandlerTest.php +++ b/core/modules/user/tests/src/PermissionHandlerTest.php @@ -28,7 +28,7 @@ class PermissionHandlerTest extends UnitTestCase { * * @var \Drupal\user\Tests\TestPermissionHandler|\Drupal\user\PermissionHandler */ - protected $permissionManager; + protected $permissionHandler; /** * The mocked module handler. @@ -56,7 +56,7 @@ protected function setUp() { } $this->stringTranslation = $this->getStringTranslationStub(); - $this->permissionManager = new TestPermissionHandler($this->moduleHandler, $this->stringTranslation); + $this->permissionHandler = new TestPermissionHandler($this->moduleHandler, $this->stringTranslation); } /** @@ -115,9 +115,9 @@ public function testBuildPermissionsModules() { ->willReturn(array_flip($modules)); // Setup system_rebuild_module_data(). - $this->permissionManager->setSystemRebuildModuleData($extensions); + $this->permissionHandler->setSystemRebuildModuleData($extensions); - $actual_permissions = $this->permissionManager->getPermissions(); + $actual_permissions = $this->permissionHandler->getPermissions(); $this->assertPermissions($actual_permissions); // Ensure that the human name of the module is taken into account for the // sorting. @@ -180,9 +180,9 @@ public function testBuildPermissionYaml() { ->willReturn(array_flip($modules)); // Setup system_rebuild_module_data(). - $this->permissionManager->setSystemRebuildModuleData($extensions); + $this->permissionHandler->setSystemRebuildModuleData($extensions); - $actual_permissions = $this->permissionManager->getPermissions(); + $actual_permissions = $this->permissionHandler->getPermissions(); $this->assertPermissions($actual_permissions); }