Defines a transform that saves the resources from a dataset.
@codeCoverageIgnore
Definition at line 14 of file ResourceImporter.php.
| Drupal\dkan_harvest\Transform\ResourceImporter::saveFile |
( |
|
$url, |
|
|
|
$dataset_id |
|
) |
| |
Pulls down external file and saves it locally.
If this method is called when PHP is running on the CLI (e.g. via drush), ‘$settings['file_public_base_url’]must be configured insettings.php‘, otherwise 'default’ will be used as the hostname in the new URL.
- Parameters
-
| string | $url | External file URL. |
| string | $dataset_id | Dataset identifier used to group resources together. |
- Returns
- string|bool The URL for the newly created file, or FALSE if failure occurs.
Definition at line 113 of file ResourceImporter.php.