public function FileMetadata::loadMetadata in File metadata manager 8
Same name and namespace in other branches
- 8.2 src/FileMetadata.php \Drupal\file_mdm\FileMetadata::loadMetadata()
Loads file metadata.
Parameters
string $metadata_id: The id of the FileMetadata plugin.
mixed $metadata: The file metadata associated to the file at URI.
Return value
bool TRUE if metadata was loaded successfully, FALSE otherwise.
Overrides FileMetadataInterface::loadMetadata
File
- src/
FileMetadata.php, line 239
Class
- FileMetadata
- A file metadata object.
Namespace
Drupal\file_mdmCode
public function loadMetadata($metadata_id, $metadata) {
if ($plugin = $this
->getFileMetadataPlugin($metadata_id)) {
return $plugin
->loadMetadata($metadata);
}
return FALSE;
}