You are here

public static function CustomBreadcrumbsForm::getTokenEntity in Custom Breadcrumbs 1.x

Get token type by entity.

Parameters

string $entity_type: Entity type.

Return value

string Array of token types.

1 call to CustomBreadcrumbsForm::getTokenEntity()
CustomBreadcrumbsForm::form in src/Form/CustomBreadcrumbsForm.php
Gets the actual form array to be built.

File

src/Form/CustomBreadcrumbsForm.php, line 221

Class

CustomBreadcrumbsForm
Custom breadcrumbs form.

Namespace

Drupal\custom_breadcrumbs\Form

Code

public static function getTokenEntity($entity_type) {
  if ($entity_type === 'taxonomy_term') {
    return 'term';
  }
  return $entity_type;
}