You are here

public function ResourceFieldResource::getResourceId in RESTful 7.2

Gets the ID on the referenced resource.

Parameters

DataInterpreterInterface $interpreter: The data interpreter to get the compound ID.

Return value

string|string[] The identifier(s) used to access the resource.

Overrides ResourceFieldResourceInterface::getResourceId

File

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

Class

ResourceFieldResource

Namespace

Drupal\restful\Plugin\resource\Field

Code

public function getResourceId(DataInterpreterInterface $interpreter) {
  if (isset($this->resourceId)) {
    return $this->resourceId;
  }
  $this->resourceId = $this
    ->compoundDocumentId($interpreter);
  return $this->resourceId;
}