You are here

public function FileEntity::getMetadata in File Entity (fieldable files) 8.2

Gets the metadata property value.

Parameters

string $property: A metadata property key.

Return value

int|null A metadata property value.

Overrides FileEntityInterface::getMetadata

2 calls to FileEntity::getMetadata()
FileEntity::postSave in src/Entity/FileEntity.php
Implements hook_file_insert().
FileEntity::updateImageFieldDimensionsByEntity in src/Entity/FileEntity.php
Update the image dimensions on the given image field on the given entity.

File

src/Entity/FileEntity.php, line 53

Class

FileEntity
Replace for the core file entity class.

Namespace

Drupal\file_entity\Entity

Code

public function getMetadata($property) {
  $this
    ->loadMetadata();
  return isset($this->metadata[$property]) ? $this->metadata[$property] : NULL;
}