You are here

protected function MigrateItemJSON::constructItemUrl in Migrate 6.2

Same name and namespace in other branches
  1. 7.2 plugins/sources/json.inc \MigrateItemJSON::constructItemUrl()

The default implementation simply replaces the :id token in the URL with the ID obtained from MigrateListJSON. Override if the item URL is not so easily expressed from the ID.

Parameters

mixed $id:

1 call to MigrateItemJSON::constructItemUrl()
MigrateItemJSON::getItem in plugins/sources/json.inc
Implementors are expected to return an object representing a source item.

File

plugins/sources/json.inc, line 153
Support for migration from JSON sources.

Class

MigrateItemJSON
Implementation of MigrateItem, for retrieving a parsed JSON object given an ID provided by a MigrateList class.

Code

protected function constructItemUrl($id) {
  return str_replace(':id', $id, $this->itemUrl);
}