You are here

public function ResourceFieldResource::getResourcePlugin in RESTful 7.2

Gets the destination resource plugin.

Return value

ResourceInterface The plugin.

Overrides ResourceFieldResourceInterface::getResourcePlugin

File

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

Class

ResourceFieldResource

Namespace

Drupal\restful\Plugin\resource\Field

Code

public function getResourcePlugin() {
  if (isset($this->resourcePlugin)) {
    return $this->resourcePlugin;
  }
  $resource_info = $this
    ->getResource();
  $this->resourcePlugin = restful()
    ->getResourceManager()
    ->getPlugin(sprintf('%s:%d.%d', $resource_info['name'], $resource_info['majorVersion'], $resource_info['minorVersion']));
  return $this->resourcePlugin;
}