You are here

public function ServiceResource::label in Services 9.0.x

Same name and namespace in other branches
  1. 8.4 src/Entity/ServiceResource.php \Drupal\services\Entity\ServiceResource::label()

Gets the label of the entity.

Return value

string|null The label of the entity, or NULL if there is no label defined.

Overrides EntityBase::label

File

src/Entity/ServiceResource.php, line 95

Class

ServiceResource
Defines service resource entity.

Namespace

Drupal\services\Entity

Code

public function label() {
  if ($service_plugin = $this
    ->getServicePlugin()) {
    return $service_plugin['title'];
  }
}