Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
registration
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
registration
Commits
c2ba47ac
Commit
c2ba47ac
authored
2 years ago
by
dubs
Committed by
john.oltman
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3334521
by Dubs: Allow 0 (unlimited) to be set on Maximum number of spaces allowed.
parent
2d8b5293
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
registration.install
+11
-0
11 additions, 0 deletions
registration.install
src/Entity/RegistrationSettings.php
+1
-1
1 addition, 1 deletion
src/Entity/RegistrationSettings.php
with
12 additions
and
1 deletion
registration.install
+
11
−
0
View file @
c2ba47ac
...
...
@@ -15,3 +15,14 @@ function registration_update_9001() {
$workflow
->
save
();
}
}
/**
* Changes the maximum spaces setting to allow zero (unlimited) value.
*/
function
registration_update_9002
()
{
$entity_definition_update_manager
=
\Drupal
::
service
(
'entity.definition_update_manager'
);
if
(
$field_definition
=
$entity_definition_update_manager
->
getFieldStorageDefinition
(
'maximum_spaces'
,
'registration_settings'
))
{
$field_definition
->
setSetting
(
'min'
,
0
);
$entity_definition_update_manager
->
updateFieldStorageDefinition
(
$field_definition
);
}
}
This diff is collapsed.
Click to expand it.
src/Entity/RegistrationSettings.php
+
1
−
1
View file @
c2ba47ac
...
...
@@ -248,7 +248,7 @@ class RegistrationSettings extends ContentEntityBase implements HostEntityKeysIn
->
setLabel
(
t
(
'Spaces allowed'
))
->
setDescription
(
t
(
'The maximum number of spaces allowed for each registrations. For no limit, use 0. (Default is 1)'
))
->
setRequired
(
TRUE
)
->
setSetting
(
'min'
,
1
)
->
setSetting
(
'min'
,
0
)
->
setSetting
(
'max'
,
99999
)
->
setDisplayOptions
(
'form'
,
[
'type'
=>
'number'
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment