public function RealisticDummyContentUserPicture::implementValueFromFile in Realistic Dummy Content 7.2
Same name and namespace in other branches
- 8.2 api/src/includes/RealisticDummyContentUserPicture.php \Drupal\realistic_dummy_content_api\includes\RealisticDummyContentUserPicture::implementValueFromFile()
Given a RealisticDummyContentFileGroup object, get a structured property.
This function is not meant to called directly; rather, call ValueFromFile(). This function must be overriden by subclasses.
Parameters
object $file: An object of type RealisticDummyContentFileGroup.
Return value
null|array Returns structured data to be added to the entity object, or NULL if such data can't be creatd.
Throws
\Exception.
Overrides RealisticDummyContentAttribute::implementValueFromFile
File
- api/
src/ includes/ RealisticDummyContentUserPicture.php, line 20
Class
- RealisticDummyContentUserPicture
- Represents the user picture.
Namespace
Drupal\realistic_dummy_content_api\includesCode
public function implementValueFromFile($file) {
$file = $this
->imageSave($file);
if ($file) {
return $file;
}
}