You are here

public function DataStream::getBundleLabel in farmOS 2.x

Gets the label of the the asset type.

Return value

string The label of the asset type.

Overrides DataStreamInterface::getBundleLabel

File

modules/core/data_stream/src/Entity/DataStream.php, line 136

Class

DataStream
Defines the Data Stream entity.

Namespace

Drupal\data_stream\Entity

Code

public function getBundleLabel() {

  /** @var \Drupal\data_stream\Entity\DataStreamTypeInterface $type */
  $type = \Drupal::entityTypeManager()
    ->getStorage('data_stream_type')
    ->load($this
    ->bundle());
  return $type
    ->label();
}