You are here

public function ResourceFieldResource::getMetadata in RESTful 7.2

Add metadata to the field.

This is a general purpose metadata storage for the field to store other things that are not specifically the field value.

Parameters

string $key: The metadata item identifier.

Return value

mixed The metadata value.

Overrides ResourceFieldInterface::getMetadata

File

src/Plugin/resource/Field/ResourceFieldResource.php, line 194
Contains \Drupal\restful\Plugin\resource\Field\ResourceFieldResource.

Class

ResourceFieldResource

Namespace

Drupal\restful\Plugin\resource\Field

Code

public function getMetadata($key) {
  return $this->decorated
    ->getMetadata($key);
}