public function FileMetadata::saveMetadataToCache in File metadata manager 8
Same name and namespace in other branches
- 8.2 src/FileMetadata.php \Drupal\file_mdm\FileMetadata::saveMetadataToCache()
Caches metadata for file at URI.
Uses the 'file_mdm' cache bin.
Parameters
string $metadata_id: The id of the FileMetadata plugin.
array $tags: (optional) An array of cache tags to save to cache.
Return value
bool TRUE if metadata was saved successfully, FALSE otherwise.
Overrides FileMetadataInterface::saveMetadataToCache
File
- src/
FileMetadata.php, line 259
Class
- FileMetadata
- A file metadata object.
Namespace
Drupal\file_mdmCode
public function saveMetadataToCache($metadata_id, array $tags = []) {
if ($plugin = $this
->getFileMetadataPlugin($metadata_id)) {
return $plugin
->saveMetadataToCache($tags);
}
return FALSE;
}