public function FileEntity::setMetadata in File Entity (fieldable files) 8.2
Sets the metadata property.
Parameters
string $property: A metadata property key.
int|null $value: A metadata property value.
Overrides FileEntityInterface::setMetadata
1 call to FileEntity::setMetadata()
- FileEntity::fetchImageDimensions in src/
Entity/ FileEntity.php - Fetch the dimensions of an image and store them in the file metadata array.
File
- src/
Entity/ FileEntity.php, line 69
Class
- FileEntity
- Replace for the core file entity class.
Namespace
Drupal\file_entity\EntityCode
public function setMetadata($property, $value) {
$this
->loadMetadata();
$this->metadata[$property] = $value;
$this->metadataChanged = TRUE;
}