diff --git a/auto_nodetitle.inc b/auto_nodetitle.inc new file mode 100644 index 0000000..a94291a --- /dev/null +++ b/auto_nodetitle.inc @@ -0,0 +1,34 @@ +registerTypes(array('node')); + } + + /** + * Make the destination field visible. + */ + public function fields() { + return array( + 'auto_nodetitle' => + t('Automatic Nodetitles: Automatically generate the title if a rule is in place for this content type (set to 0 to prevent automatic title generation during migration'), + ); + } + + public function prepare($entity, stdClass $row) { + if (isset($entity->auto_nodetitle)) { + if (!$entity->auto_nodetitle) { + $entity->auto_nodetitle_applied = TRUE; + } + unset($entity->pathauto); + } + } +} diff --git a/migrate_extras.info b/migrate_extras.info index abfa7ef..dc0251f 100644 --- a/migrate_extras.info +++ b/migrate_extras.info @@ -4,6 +4,7 @@ core = 7.x package=Development dependencies[] = migrate +files[] = auto_nodetitle.inc files[] = addressfield.inc files[] = date.inc files[] = flag.inc