function DummyEnvironment::_file_save_data_ in Realistic Dummy Content 8
Overrides Environment::_file_save_data_
File
- api/
src/ environments/ DummyEnvironment.php, line 39 - Define autoload class.
Class
- DummyEnvironment
- The dummy environment.
Namespace
Drupal\realistic_dummy_content_api\environmentsCode
function _file_save_data_($data, $destination = NULL) {
if (!$destination) {
throw new \Exception('the dummy file system is not designed to use null destination');
}
$parsed = parse_url($destination);
$return_array = array(
'fid' => 1,
'uri' => $destination,
'filename' => $parsed['host'],
);
return (object) $return;
}