Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
WCMS
uw_migrate
Commits
790e1e46
Commit
790e1e46
authored
Apr 05, 2022
by
Chris Shantz
Browse files
Merge branch '1.0.x' into prod/1.0.x
parents
69bc33b3
d3d6fe27
Changes
27
Hide whitespace changes
Inline
Side-by-side
migrations/block_content/uw_cbl_copy_text.yml
View file @
790e1e46
...
...
@@ -44,6 +44,7 @@ process:
uw_ct_web_page
:
{}
uw_ct_opportunity
:
{}
uw_ct_service
:
{}
uw_ct_project
:
{}
-
plugin
:
uw_dom_inline_image_handler
-
plugin
:
uw_dom_inline_file_handler
-
plugin
:
dom
...
...
@@ -68,3 +69,4 @@ migration_dependencies:
-
uw_ct_web_page
-
uw_ct_opportunity
-
uw_ct_service
-
uw_ct_project
migrations/block_content/uw_cbl_image_gallery.yml
View file @
790e1e46
...
...
@@ -28,6 +28,13 @@ process:
migration
:
uw_mt_image
source
:
fid
no_stub
:
true
field_uw_type_of_gallery
:
plugin
:
static_map
source
:
gallery_type
map
:
Carousel
:
slider
Thumbnails
:
grid
default_value
:
slider
destination
:
plugin
:
entity:block_content
default_bundle
:
uw_cbl_image_gallery
...
...
migrations/block_content/uw_cbl_related_links.yml
View file @
790e1e46
...
...
@@ -45,3 +45,4 @@ migration_dependencies:
-
uw_ct_web_page
-
uw_ct_opportunity
-
uw_ct_service
-
uw_ct_project
migrations/block_content/uw_field_body_no_summary_promo_item.yml
View file @
790e1e46
...
...
@@ -32,6 +32,7 @@ process:
uw_ct_profile
:
{}
uw_ct_web_page
:
{}
uw_ct_service
:
{}
uw_ct_project
:
{}
-
plugin
:
uw_dom_inline_image_handler
-
plugin
:
dom
method
:
export
...
...
@@ -54,3 +55,4 @@ migration_dependencies:
-
uw_ct_site_footer
-
uw_ct_web_page
-
uw_ct_service
-
uw_ct_project
migrations/media/uw_mt_image.yml
View file @
790e1e46
...
...
@@ -21,6 +21,7 @@ source:
-
field_profile_photo
-
field_uw_image_gallery_images
-
field_image_opportunities
-
field_project_image
properties
:
-
alt
-
title
...
...
migrations/node/uw_ct_profile.yml
View file @
790e1e46
...
...
@@ -24,11 +24,11 @@ process:
migration
:
uw_mt_image
source
:
field_profile_photo/0/fid
no_stub
:
true
field_uw_ct_profile_contact
:
plugin
:
migration_lookup
migration
:
uw_ct_contact
source
:
field_contact_information
no_stub
:
true
field_uw_ct_profile_
link_
contact
:
-
plugin
:
migration_lookup
migration
:
uw_ct_contact
source
:
field_contact_information
-
plugin
:
uw_contact_link
field_uw_ct_profile_type
:
plugin
:
migration_lookup
migration
:
uw_taxonomy_term
...
...
migrations/node/uw_ct_project.yml
0 → 100644
View file @
790e1e46
id
:
uw_ct_project
label
:
Project
migration_group
:
uw
audit
:
true
migration_tags
:
-
Drupal
7
-
Content
-
Node
source
:
plugin
:
uw_node
node_type
:
uw_project
batch_size
:
200
process
:
title
:
title
field_uw_project_listing_image
:
plugin
:
migration_lookup
migration
:
uw_mt_image
source
:
field_project_image/0/fid
no_stub
:
true
pseudo_field_uw_project_members
:
plugin
:
sub_process
source
:
field_project_leaderrole
process
:
paragraph
:
plugin
:
migration_lookup
migration
:
uw_para_project_members
source
:
value
field_uw_project_members
:
plugin
:
sub_process
source
:
'
@pseudo_field_uw_project_members'
process
:
target_id
:
paragraph/0
target_revision_id
:
paragraph/1
field_uw_project_timeline
:
plugin
:
uw_smartdate
source
:
field_project_date
field_uw_project_status
:
plugin
:
migration_lookup
migration
:
uw_taxonomy_term
source
:
field_project_status
no_stub
:
true
field_uw_audience
:
plugin
:
sub_process
source
:
field_project_audience
process
:
target_id
:
plugin
:
migration_lookup
migration
:
uw_taxonomy_term
source
:
tid
no_stub
:
true
field_uw_project_topics
:
plugin
:
sub_process
source
:
field_project_topic
process
:
target_id
:
plugin
:
migration_lookup
migration
:
uw_taxonomy_term
source
:
tid
no_stub
:
true
field_uw_project_summary
:
plugin
:
uw_summary
trimmed
:
true
source
:
field_project_description
field_uw_meta_description
:
plugin
:
uw_summary
trimmed
:
true
source
:
field_project_description
uid
:
-
plugin
:
migration_lookup
migration
:
uw_user
source
:
node_uid
no_stub
:
true
-
plugin
:
default_value
default_value
:
0
langcode
:
plugin
:
default_value
source
:
language
default_value
:
"
und"
status
:
status
moderation_state
:
plugin
:
static_map
source
:
status
map
:
'
0'
:
draft
'1'
:
published
default_value
:
draft
created
:
created
changed
:
changed
promote
:
promote
sticky
:
sticky
revision_uid
:
-
plugin
:
migration_lookup
migration
:
uw_user
source
:
revision_uid
no_stub
:
true
-
plugin
:
default_value
default_value
:
0
revision_log
:
log
revision_timestamp
:
timestamp
field_uw_meta_tags
:
plugin
:
d7_metatag_entities
source
:
pseudo_metatag_entities
destination
:
plugin
:
entity:node
default_bundle
:
uw_ct_project
migration_dependencies
:
required
:
-
uw_user
-
uw_taxonomy_term
optional
:
-
uw_mt_image
-
uw_para_project_members
-
uw_ct_contact
-
uw_ct_profile
migrations/paragraph/uw_para_call_to_action.yml
View file @
790e1e46
...
...
@@ -77,3 +77,4 @@ migration_dependencies:
-
uw_ct_web_page
-
uw_ct_opportunity
-
uw_ct_service
-
uw_ct_project
migrations/paragraph/uw_para_image_banner.yml
View file @
790e1e46
...
...
@@ -36,3 +36,4 @@ migration_dependencies:
-
uw_ct_web_page
-
uw_ct_opportunity
-
uw_ct_service
-
uw_ct_project
migrations/paragraph/uw_para_project_members.yml
0 → 100644
View file @
790e1e46
id
:
uw_para_project_members
label
:
'
Project
members
paragraphs'
migration_tags
:
-
Drupal
7
-
Content
-
Paragraph
migration_group
:
uw
source
:
plugin
:
uw_field_collection_item
field_name
:
field_project_leaderrole
process
:
field_uw_project_name
:
field_project_name/0/title
field_uw_project_members_link
:
-
plugin
:
skip_on_empty
method
:
process
source
:
field_project_name/0/url
-
plugin
:
uw_migration_lookup_path
source
:
field_project_name
-
plugin
:
field_link
uri_scheme
:
https://
field_uw_project_role
:
plugin
:
migration_lookup
migration
:
uw_taxonomy_term
source
:
field_project_roles
no_stub
:
true
destination
:
plugin
:
entity_reference_revisions:paragraph
default_bundle
:
uw_para_project_members
migration_dependencies
:
optional
:
-
uw_taxonomy_term
-
uw_ct_contact
-
uw_ct_profile
migrations/paragraph/uw_para_timeline.yml
View file @
790e1e46
...
...
@@ -51,3 +51,4 @@ migration_dependencies:
-
uw_ct_web_page
-
uw_ct_opportunity
-
uw_ct_service
-
uw_ct_project
migrations/uw_menu_links.yml
View file @
790e1e46
...
...
@@ -69,3 +69,4 @@ migration_dependencies:
-
uw_ct_web_page
-
uw_ct_opportunity
-
uw_ct_service
-
uw_ct_project
migrations/uw_path_redirect.yml
View file @
790e1e46
...
...
@@ -34,6 +34,7 @@ process:
-
uw_ct_web_page
-
uw_ct_opportunity
-
uw_ct_service
-
uw_ct_project
-
plugin
:
extract
index
:
-
0
...
...
@@ -57,3 +58,4 @@ migration_dependencies:
-
uw_ct_web_page
-
uw_ct_opportunity
-
uw_ct_service
-
uw_ct_project
migrations/uw_taxonomy_term.yml
View file @
790e1e46
...
...
@@ -19,6 +19,9 @@ source:
-
uw_event_type
-
uwaterloo_audience
-
service_categories
-
project_status
-
project_role
-
project_topic
process
:
vid
:
plugin
:
static_map
...
...
@@ -35,6 +38,9 @@ process:
uwaterloo_faculties
:
uw_vocab_faculties_and_schools
uwaterloo_audience
:
uw_vocab_audience
service_categories
:
uw_vocab_service_categories
project_status
:
uw_vocab_project_status
project_role
:
uw_vocab_project_role
project_topic
:
uw_vocab_project_topic
tid
:
plugin
:
uw_taxonomy_term_lookup
source
:
...
...
migrations/uw_url_alias_node.yml
View file @
790e1e46
...
...
@@ -42,6 +42,7 @@ process:
-
uw_ct_web_page
-
uw_ct_opportunity
-
uw_ct_service
-
uw_ct_project
no_stub
:
true
-
plugin
:
skip_on_empty
...
...
@@ -71,3 +72,4 @@ migration_dependencies:
-
uw_ct_web_page
-
uw_ct_opportunity
-
uw_ct_service
-
uw_ct_project
src/Plugin/migrate/UwContentFieldsDeriver.php
View file @
790e1e46
...
...
@@ -47,6 +47,7 @@ class UwContentFieldsDeriver extends DeriverBase implements ContainerDeriverInte
'field_image_gallery_bottom'
,
'field_sidebar_content'
,
'field_position_description'
,
'field_project_description'
,
];
foreach
(
$fields
as
$field_name
)
{
...
...
src/Plugin/migrate/UwLayoutBuilderDeriver.php
View file @
790e1e46
...
...
@@ -79,6 +79,11 @@ class UwLayoutBuilderDeriver extends DeriverBase implements ContainerDeriverInte
'uw_ct_opportunity'
,
],
],
'field_project_description'
=>
[
'content_migrations'
=>
[
'uw_ct_project'
,
],
],
];
foreach
(
$fields
as
$field_name
=>
$data
)
{
...
...
src/Plugin/migrate/process/UwContactLink.php
0 → 100644
View file @
790e1e46
<?php
namespace
Drupal\uw_migrate\Plugin\migrate\process
;
use
Drupal\migrate\MigrateExecutableInterface
;
use
Drupal\migrate\ProcessPluginBase
;
use
Drupal\migrate\Row
;
/**
* Creates a link from entity reference.
*
* @code
* process:
* destination_field:
* plugin: uw_contact_link
* source: source_field
* @endcode
*
* @MigrateProcessPlugin(
* id = "uw_contact_link"
* )
*/
class
UwContactLink
extends
ProcessPluginBase
{
/**
* {@inheritDoc}
*/
public
function
transform
(
$value
,
MigrateExecutableInterface
$migrate_executable
,
Row
$row
,
$destination_property
)
{
if
(
$value
)
{
$value
=
'entity:node/'
.
$value
;
}
return
$value
;
}
}
src/Plugin/migrate/process/UwNodeLookup.php
View file @
790e1e46
...
...
@@ -36,6 +36,7 @@ class UwNodeLookup extends MigrationLookup {
'uw_ct_opportunity'
,
'uw_ct_profile'
,
'uw_ct_service'
,
'uw_ct_project'
,
'uw_ct_site_footer'
,
'uw_ct_web_page'
,
];
...
...
src/Plugin/migrate/process/UwSmartDate.php
View file @
790e1e46
...
...
@@ -36,14 +36,15 @@ class UwSmartDate extends ProcessPluginBase {
$prev_item
=
NULL
;
foreach
(
$value
as
$item
)
{
$start_value
=
new
DrupalDateTime
(
$item
[
'value'
],
$item
[
'timezone'
]);
$end_value
=
new
DrupalDateTime
(
$item
[
'value2'
],
$item
[
'timezone'
]);
$timezone
=
$item
[
'timezone'
]
??
'America/Toronto'
;
$start_value
=
new
DrupalDateTime
(
$item
[
'value'
],
$timezone
);
$end_value
=
new
DrupalDateTime
(
$item
[
'value2'
],
$timezone
);
$new_item
=
[
'value'
=>
$start_value
->
getTimestamp
(),
'end_value'
=>
$end_value
->
getTimestamp
(),
'duration'
=>
(
int
)
(
$end_value
->
getTimestamp
()
-
$start_value
->
getTimestamp
())
/
60
,
'timezone'
=>
$
item
[
'
timezone
'
]
,
'timezone'
=>
$timezone
,
];
if
(
empty
(
$item
[
'rrule'
]))
{
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment