Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
migrate_wizard
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
migrate_wizard
Merge requests
!21
Corrections and improvements in the construction of the migration configuration forms.
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Corrections and improvements in the construction of the migration configuration forms.
issue/migrate_wizard-3481428:3481428-erroneous-collection-of
into
3.0.x
Overview
0
Commits
1
Pipelines
0
Changes
2
Merged
Álvaro Olvera Fernández
requested to merge
issue/migrate_wizard-3481428:3481428-erroneous-collection-of
into
3.0.x
8 months ago
Overview
0
Commits
1
Pipelines
0
Changes
2
Expand
Closes
#3481428
0
0
Merge request reports
Compare
3.0.x
3.0.x (base)
and
latest version
latest version
a061ce38
1 commit,
8 months ago
2 files
+
40
−
42
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
src/Form/CreateMWDatabase.php
+
18
−
19
Options
@@ -58,33 +58,32 @@ class CreateMWDatabase extends ConfigFormBase {
*/
public
function
buildForm
(
array
$form
,
FormStateInterface
$form_state
)
{
$database_fields
=
[
$this
->
t
(
'
id
'
),
$this
->
t
(
'
m
igration
_
group'
),
$this
->
t
(
'
k
ey'
),
$this
->
t
(
'
t
arget'
),
$this
->
t
(
'host'
),
$this
->
t
(
'
d
atabase'
),
$this
->
t
(
'username'
),
$this
->
t
(
'password'
),
$this
->
t
(
'prefix'
),
$this
->
t
(
'driver'
),
$this
->
t
(
'port'
),
$this
->
t
(
'
namespace'
),
$this
->
t
(
'collation'
),
$this
->
t
(
'url_files_prod'
),
'id'
=>
$this
->
t
(
'
Migration ID
'
),
'migration_group'
=>
$this
->
t
(
'
M
igration
group'
),
'key'
=>
$this
->
t
(
'
K
ey'
),
'target'
=>
$this
->
t
(
'
T
arget'
),
'host'
=>
$this
->
t
(
'
Database
host'
),
'database'
=>
$this
->
t
(
'
D
atabase
name
'
),
'username'
=>
$this
->
t
(
'
Database
username'
),
'password'
=>
$this
->
t
(
'
Database
password'
),
'prefix'
=>
$this
->
t
(
'
Database
prefix'
),
'driver'
=>
$this
->
t
(
'
Database
driver'
),
'port'
=>
$this
->
t
(
'
Database
port'
),
'namespace'
=>
$this
->
t
(
'Database driver
namespace'
),
'collation'
=>
$this
->
t
(
'
Database
collation'
),
'url_files_prod'
=>
$this
->
t
(
'Production URL'
),
];
$use_envs
=
[
'host'
,
'database'
,
'username'
,
'password'
];
$use_envs
=
[
'key'
,
'target'
,
'host'
,
'database'
,
'username'
,
'password'
];
$form
[
'use_env'
]
=
[
'#type'
=>
'checkbox'
,
'#title'
=>
$this
->
t
(
'Use .env *'
),
];
foreach
(
$database_fields
as
$database_field
)
{
$database_field
=
$database_field
->
render
();
foreach
(
$database_fields
as
$key
=>
$database_field
)
{
$title
=
$database_field
;
if
(
in_array
(
$
database_field
,
$use_envs
))
{
if
(
in_array
(
$
key
,
$use_envs
))
{
$title
=
$title
.
' *'
;
}
$form
[
$
database_field
]
=
[
$form
[
$
key
]
=
[
'#type'
=>
'textfield'
,
'#title'
=>
$title
,
'#size'
=>
'20'
,
Loading