You are here

public function FileMetadata::saveMetadataToFile in File metadata manager 8

Same name and namespace in other branches
  1. 8.2 src/FileMetadata.php \Drupal\file_mdm\FileMetadata::saveMetadataToFile()

Saves metadata to file at URI.

Parameters

string $metadata_id: The id of the FileMetadata plugin.

Return value

bool TRUE if metadata was saved successfully, FALSE otherwise.

Overrides FileMetadataInterface::saveMetadataToFile

File

src/FileMetadata.php, line 269

Class

FileMetadata
A file metadata object.

Namespace

Drupal\file_mdm

Code

public function saveMetadataToFile($metadata_id) {
  if ($plugin = $this
    ->getFileMetadataPlugin($metadata_id)) {
    return $plugin
      ->saveMetadataToFile();
  }
  return FALSE;
}