You are here

public function ResourceFieldCollection::getResourceName in RESTful 7.2

Gets the resource name.

Return value

string The resource name.

Overrides ResourceFieldCollectionInterface::getResourceName

File

src/Plugin/resource/Field/ResourceFieldCollection.php, line 254
Contains \Drupal\restful\Plugin\resource\Field\ResourceFieldCollection.

Class

ResourceFieldCollection

Namespace

Drupal\restful\Plugin\resource\Field

Code

public function getResourceName() {
  $resource_id = $this
    ->getResourceId();
  $pos = strpos($resource_id, Resource::DERIVATIVE_SEPARATOR);
  return $pos === FALSE ? $resource_id : substr($resource_id, 0, $pos);
}