Add the "publication date" default value in the blog and gleaning types
This commit is contained in:
parent
b07c74d77e
commit
42d6b6c757
4 changed files with 24 additions and 2 deletions
|
@ -20,7 +20,7 @@ class PublicationDateDefault extends ProcessPluginBase {
|
|||
*/
|
||||
public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
|
||||
$created_date = $row->getSourceProperty('created');
|
||||
if (empty($value)) {
|
||||
if (!isset($value) || empty($value)) {
|
||||
$value = [0 => ['value' => date('Y-m-d\TH:i:s', $created_date)]];
|
||||
}
|
||||
return $value;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue