Skip to content
Snippets Groups Projects
Commit 5c2d828b authored by Eric Bremner's avatar Eric Bremner
Browse files

ISTWCMS-3921: removing unused code in the content access form

parent 736dc507
No related branches found
No related tags found
No related merge requests found
...@@ -16,69 +16,11 @@ use Symfony\Component\DependencyInjection\ContainerInterface; ...@@ -16,69 +16,11 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
class UwContentAccessForm extends FormBase { class UwContentAccessForm extends FormBase {
/**
* The permission handler.
*
* @var \Drupal\user\PermissionHandlerInterface
*/
protected $permissionHandler;
/**
* The role storage.
*
* @var \Drupal\user\RoleStorageInterface
*/
protected $roleStorage;
/**
* The module handler.
*
* @var \Drupal\Core\Extension\ModuleHandlerInterface
*/
protected $moduleHandler;
/**
* Constructs a new UserPermissionsForm.
*
* @param \Drupal\user\PermissionHandlerInterface $permission_handler
* The permission handler.
* @param \Drupal\user\RoleStorageInterface $role_storage
* The role storage.
* @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
* The module handler.
*/
public function __construct(PermissionHandlerInterface $permission_handler, RoleStorageInterface $role_storage, ModuleHandlerInterface $module_handler) {
$this->permissionHandler = $permission_handler;
$this->roleStorage = $role_storage;
$this->moduleHandler = $module_handler;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container) {
return new static(
$container->get('user.permissions'),
$container->get('entity_type.manager')->getStorage('user_role'),
$container->get('module_handler')
);
}
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function getFormId() { public function getFormId() {
return 'uw_contact_access_form'; return 'uw_content_access_form';
}
/**
* Gets the roles to display in this form.
*
* @return \Drupal\user\RoleInterface[]
* An array of role objects.
*/
protected function getRoles() {
return $this->roleStorage->loadMultiple();
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment