diff --git a/src/Form/UwContentAccessForm.php b/src/Form/UwContentAccessForm.php index 69b38cea7b1779ace0ab947c051b6bbe2b88db8d..4eace56cee3a5d260070a374303cd25fe7c62f82 100644 --- a/src/Form/UwContentAccessForm.php +++ b/src/Form/UwContentAccessForm.php @@ -16,69 +16,11 @@ use Symfony\Component\DependencyInjection\ContainerInterface; 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} */ public function getFormId() { - return 'uw_contact_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(); + return 'uw_content_access_form'; } /**