Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
35458b5d
Commit
35458b5d
authored
Jul 08, 2014
by
alexpott
Browse files
Issue
#2260241
by ultimike, benjy, er.pushpinderrana: Fixed D6->D8 Profile field (date).
parent
aa898f8b
Changes
3
Hide whitespace changes
Inline
Side-by-side
core/modules/migrate_drupal/config/install/migrate.migration.d6_user_profile_field.yml
View file @
35458b5d
...
...
@@ -18,6 +18,9 @@ process:
textfield
:
text
textarea
:
text_long
url
:
link
settings
:
plugin
:
d6_profile_field_settings
source
:
type
settings.allowed_values
:
options
cardinality
:
plugin
:
static_map
...
...
core/modules/migrate_drupal/src/Plugin/migrate/process/d6/ProfileFieldSettings.php
0 → 100644
View file @
35458b5d
<?php
/**
* @file
* Contains \Drupal\migrate_drupal\Plugin\migrate\Process\d6\ProfileFieldSettings.
*/
namespace
Drupal\migrate_drupal\Plugin\migrate\Process\d6
;
use
Drupal\migrate\MigrateExecutable
;
use
Drupal\migrate\ProcessPluginBase
;
use
Drupal\migrate\Row
;
/**
* @MigrateProcessPlugin(
* id = "d6_profile_field_settings"
* )
*/
class
ProfileFieldSettings
extends
ProcessPluginBase
{
/**
* {@inheritdoc}
*
* Set the profile field settings configuration.
*/
public
function
transform
(
$type
,
MigrateExecutable
$migrate_executable
,
Row
$row
,
$destination_property
)
{
$settings
=
array
();
switch
(
$type
)
{
case
'date'
:
$settings
[
'datetime_type'
]
=
'date'
;
break
;
}
return
$settings
;
}
}
core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileFieldTest.php
View file @
35458b5d
...
...
@@ -86,6 +86,7 @@ public function testUserProfileFields() {
// Migrated date field.
$field
=
entity_load
(
'field_config'
,
'user.profile_birthdate'
);
$this
->
assertEqual
(
$field
->
type
,
'datetime'
,
'Field type is datetime.'
);
$this
->
assertEqual
(
$field
->
settings
[
'datetime_type'
],
'date'
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment