You are here

protected function GetImageSize::doSetMetadata in File metadata manager 8

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

Sets a metadata element.

Parameters

mixed $key: A key to determine the metadata element to be changed.

mixed $value: The value to change the metadata element to.

Return value

bool TRUE if metadata was changed successfully, FALSE otherwise.

Overrides FileMetadataPluginBase::doSetMetadata

File

src/Plugin/FileMetadata/GetImageSize.php, line 72

Class

GetImageSize
FileMetadata plugin for getimagesize.

Namespace

Drupal\file_mdm\Plugin\FileMetadata

Code

protected function doSetMetadata($key, $value) {
  $this
    ->validateKey($key, __FUNCTION__);
  $this->metadata[$key] = $value;
  return TRUE;
}