public function FileEntity::hasMetadata in File Entity (fieldable files) 8.2
Determines whether or not metadata property exists.
Parameters
string $property: A metadata property key.
Return value
bool Returns TRUE if metadata property is set.
Overrides FileEntityInterface::hasMetadata
File
- src/
Entity/ FileEntity.php, line 61
Class
- FileEntity
- Replace for the core file entity class.
Namespace
Drupal\file_entity\EntityCode
public function hasMetadata($property) {
$this
->loadMetadata();
return isset($this->metadata[$property]);
}