Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
U
UVF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Reena Raghavan
UVF
Commits
e37b46e1
Commit
e37b46e1
authored
Nov 07, 2022
by
Reena Raghavan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modified Article.php and migrate_plus.migration.article.yml
parent
6b965e48
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
11 deletions
+9
-11
web/modules/custom/uvf_migrate/config/install/migrate_plus.migration.article.yml
...migrate/config/install/migrate_plus.migration.article.yml
+1
-1
web/modules/custom/uvf_migrate/src/Plugin/migrate/source/Article.php
.../custom/uvf_migrate/src/Plugin/migrate/source/Article.php
+8
-10
No files found.
web/modules/custom/uvf_migrate/config/install/migrate_plus.migration.article.yml
View file @
e37b46e1
...
...
@@ -8,11 +8,11 @@ source:
destination
:
plugin
:
entity:node
default_bundle
:
article
process
:
nid
:
nid
title
:
title
body
:
body
migration_dependencies
:
required
:
{}
...
...
web/modules/custom/uvf_migrate/src/Plugin/migrate/source/Article.php
View file @
e37b46e1
...
...
@@ -27,7 +27,7 @@ class Article extends SqlBase
public
function
query
()
{
$query
=
$this
->
select
(
'node_field_data'
,
'ar'
)
->
fields
(
'ar'
,
[
'nid'
,
'title'
,
'body'
]);
->
fields
(
'ar'
,
[
'nid'
,
'title'
]);
return
$query
;
...
...
@@ -40,8 +40,7 @@ public function fields()
{
$fields
=
[
'nid'
=>
$this
->
t
(
'nid'
),
'title'
=>
$this
->
t
(
'title'
),
'body'
=>
$this
->
t
(
'body'
)
'title'
=>
$this
->
t
(
'title'
)
];
return
$fields
;
...
...
@@ -63,11 +62,10 @@ public function getIds()
/**
* {@inheritdoc}
*/
// public function prepareRow(Row $row)
// {
// $publish_date = $row->getSourceProperty('publish_date');
// $new_date = date('Y-m-d\Th:i:s', strtotime($publish_date));
// $row->setSourceProperty('publish_date', $new_date);
// return parent::prepareRow($row);
// }
public
function
prepareRow
(
Row
$row
)
{
$nid
=
$row
->
getSourceProperty
(
'nid'
);
$row
->
setSourceProperty
(
'nid'
,
$nid
);
return
parent
::
prepareRow
(
$row
);
}
}
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