You are here

protected function GetImageSize::doRemoveMetadata 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::doRemoveMetadata()

Removes a metadata element.

Parameters

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

Return value

bool TRUE if metadata was removed successfully, FALSE otherwise.

Overrides FileMetadataPluginBase::doRemoveMetadata

File

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

Class

GetImageSize
FileMetadata plugin for getimagesize.

Namespace

Drupal\file_mdm\Plugin\FileMetadata

Code

protected function doRemoveMetadata($key) {
  $this
    ->validateKey($key, __FUNCTION__);
  if (isset($this->metadata[$key])) {
    unset($this->metadata[$key]);
  }
  return TRUE;
}