You are here

private function EckRoutes::createBundleListRoute in Entity Construction Kit (ECK) 8

Creates the bundle listing route.

Parameters

string $entityTypeId: The entity type id.

string $entityTypeLabel: The entity type label.

Return value

\Symfony\Component\Routing\Route The created bundle listing route.

1 call to EckRoutes::createBundleListRoute()
EckRoutes::routes in src/Routing/EckRoutes.php

File

src/Routing/EckRoutes.php, line 73

Class

EckRoutes
Defines dynamic routes.

Namespace

Drupal\eck\Routing

Code

private function createBundleListRoute($entityTypeId, $entityTypeLabel) {
  $path = "admin/structure/eck/{$entityTypeId}/bundles";
  $defaults = [
    '_controller' => '\\Drupal\\Core\\Entity\\Controller\\EntityListController::listing',
    'entity_type' => "{$entityTypeId}_type",
    '_title' => '%type bundles',
    '_title_arguments' => [
      '%type' => ucfirst($entityTypeLabel),
    ],
  ];
  return new Route($path, $defaults, $this
    ->getBundleRouteRequirements());
}