protected function MigrateListJSON::getIDsFromJSON in Migrate 7.2
Same name and namespace in other branches
- 6.2 plugins/sources/json.inc \MigrateListJSON::getIDsFromJSON()
Given an array generated from JSON, parse out the IDs for processing and return them as an array. The default implementation assumes the IDs are simply the values of the top-level elements - in most cases, you will need to override this to reflect your particular JSON structure.
Parameters
array $data:
Return value
array
2 calls to MigrateListJSON::getIDsFromJSON()
- MigrateListJSON::computeCount in plugins/
sources/ json.inc - Return a count of all available IDs from the source listing. The default implementation assumes the count of top-level elements reflects the number of IDs available - in many cases, you will need to override this to reflect your particular JSON structure.
- MigrateListJSON::getIdList in plugins/
sources/ json.inc - Load the JSON at the given URL, and return an array of the IDs found within it.
File
- plugins/
sources/ json.inc, line 75 - Support for migration from JSON sources.
Class
- MigrateListJSON
- Implementation of MigrateList, for retrieving a list of IDs to be migrated from a JSON object.
Code
protected function getIDsFromJSON(array $data) {
return $data;
}