You are here

protected function WordPressMigration::generateMachineName in WordPress Migrate 7

Construct the machine name from the blog title

Overrides MigrationBase::generateMachineName

6 calls to WordPressMigration::generateMachineName()
WordPressAttachment::postImport in ./wordpress_attachment.inc
Called after all attachments are imported - fix up references to the imported attachments in node bodies.
WordPressAttachment::__construct in ./wordpress_attachment.inc
Set it up
WordPressComment::__construct in ./wordpress_comment.inc
Set it up
WordPressItemMigration::replaceLinks in ./wordpress_item.inc
If we have a local link of the form ?p=34, translate the WordPress ID into a Drupal nid, and rewrite the link.
WordPressItemMigration::__construct in ./wordpress_item.inc
Set it up

... See full list

File

./wordpress.inc, line 39
Implementation of migration from WordPress into Drupal

Class

WordPressMigration
@file Implementation of migration from WordPress into Drupal

Code

protected function generateMachineName($class_name = NULL) {
  if (!$class_name) {
    $class_name = get_class($this);
  }

  // The machine name is the cleansed blog title, followed by the portion
  // of the class name after WordPress. For example, for
  // category migration (class WordPressCategory) of "Mike's Blog",
  // the generated machine name will be MikesBlogCategory.
  return $this->blog
    ->machineName($class_name);
}