You are here

class MigrateXMLFieldMapping in Migrate 7.2

Same name and namespace in other branches
  1. 6.2 plugins/sources/xml.inc \MigrateXMLFieldMapping

Adds xpath info to field mappings for XML sources

Hierarchy

Expanded class hierarchy of MigrateXMLFieldMapping

1 string reference to 'MigrateXMLFieldMapping'
migrate_ui_edit_mappings in migrate_ui/migrate_ui.pages.inc
Page callback to edit field mappings for a given migration.

File

plugins/sources/xml.inc, line 287
Support for migration from XML sources.

View source
class MigrateXMLFieldMapping extends MigrateFieldMapping {

  /**
   * The xpath used to retrieve the data for this field from the XML.
   *
   * @var string
   */
  protected $xpath;

  /**
   * Get xpath of current item.
   */
  public function getXpath() {
    return $this->xpath;
  }

  /**
   * Add an xpath to this field mapping.
   *
   * @param string $xpath
   *   xpath
   *
   * @return MigrateFieldMapping
   *   MigrateFieldMapping
   */
  public function xpath($xpath) {
    $this->xpath = $xpath;
    return $this;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
MigrateFieldMapping::$arguments protected property Argument overrides. If present this will be an array, keyed by a field API array key, with one or both of these entries: 'source_field' - Name of the source field in the incoming row containing the value to be…
MigrateFieldMapping::$callbacks protected property Array of callbacks to be called on a source value.
MigrateFieldMapping::$dedupe protected property An associative array with keys:
MigrateFieldMapping::$defaultValue protected property Default value for simple mappings, when there is no source mapping or the source field is empty. If both this and the sourceField are omitted, the mapping is just a stub for annotating the destination field.
MigrateFieldMapping::$description protected property
MigrateFieldMapping::$destinationField protected property Destination field name for the mapping. If empty, the mapping is just a stub for annotating the source field.
MigrateFieldMapping::$issueGroup protected property
MigrateFieldMapping::$issueNumber protected property
MigrateFieldMapping::$issuePriority protected property
MigrateFieldMapping::$mappingSource protected property
MigrateFieldMapping::$priorities public static property
MigrateFieldMapping::$separator protected property Separator string. If present, the destination field will be set up as an array of values exploded from the corresponding source field.
MigrateFieldMapping::$sourceField protected property Source field name for the mapping. If empty, the defaultValue will be applied.
MigrateFieldMapping::$sourceMigration protected property Class name of source migration for a field. If present, the value in the source field is considered to be a source ID in the mapping table of this migration, and the corresponding destination ID will be retrieved.
MigrateFieldMapping::arguments public function
MigrateFieldMapping::callback public function
MigrateFieldMapping::callbacks public function
MigrateFieldMapping::dedupe public function
MigrateFieldMapping::defaultValue public function
MigrateFieldMapping::description public function
MigrateFieldMapping::getArguments public function
MigrateFieldMapping::getCallbacks public function
MigrateFieldMapping::getDedupe public function
MigrateFieldMapping::getDefaultValue public function
MigrateFieldMapping::getDescription public function
MigrateFieldMapping::getDestinationField public function
MigrateFieldMapping::getIssueGroup public function
MigrateFieldMapping::getIssueNumber public function
MigrateFieldMapping::getIssuePriority public function
MigrateFieldMapping::getMappingSource public function
MigrateFieldMapping::getSeparator public function
MigrateFieldMapping::getSourceField public function
MigrateFieldMapping::getSourceMigration public function
MigrateFieldMapping::issueGroup public function
MigrateFieldMapping::issueNumber public function
MigrateFieldMapping::issuePriority public function
MigrateFieldMapping::ISSUE_PRIORITY_BLOCKER constant
MigrateFieldMapping::ISSUE_PRIORITY_LOW constant
MigrateFieldMapping::ISSUE_PRIORITY_MEDIUM constant
MigrateFieldMapping::ISSUE_PRIORITY_OK constant
MigrateFieldMapping::MAPPING_SOURCE_CODE constant
MigrateFieldMapping::MAPPING_SOURCE_DB constant
MigrateFieldMapping::separator public function
MigrateFieldMapping::setMappingSource public function
MigrateFieldMapping::sourceMigration public function
MigrateFieldMapping::__construct public function
MigrateXMLFieldMapping::$xpath protected property The xpath used to retrieve the data for this field from the XML.
MigrateXMLFieldMapping::getXpath public function Get xpath of current item.
MigrateXMLFieldMapping::xpath public function Add an xpath to this field mapping.