You are here

protected function TransactionTypeListBuilder::getTargetType in Transaction 8

Gets the target entity type label for the given transaction type.

Parameters

\Drupal\transaction\TransactionTypeInterface $transaction_type: The transaction type.

Return value

array A render array of the target entity type label.

1 call to TransactionTypeListBuilder::getTargetType()
TransactionTypeListBuilder::buildRow in src/TransactionTypeListBuilder.php
Builds a row for an entity in the entity listing.

File

src/TransactionTypeListBuilder.php, line 103

Class

TransactionTypeListBuilder
Provides a entity list page for transaction types.

Namespace

Drupal\transaction

Code

protected function getTargetType(TransactionTypeInterface $transaction_type) {
  $target_entity_type = $this->entityTypeManager
    ->getDefinition($transaction_type
    ->getTargetEntityTypeId());
  return [
    'data' => [
      '#markup' => $target_entity_type
        ->getLabel(),
    ],
  ];
}