You are here

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

Creates a bundle crud route.

Parameters

string $entityTypeId: The entity type id.

string $entityTypeLabel: The entity type label.

string $path: The path.

string $op: The operation.

Return value

\Symfony\Component\Routing\Route The bundle crud route.

3 calls to EckRoutes::createBundleCrudRoute()
EckRoutes::createAddBundleRoute in src/Routing/EckRoutes.php
Creates the add bundle route.
EckRoutes::createDeleteBundleRoute in src/Routing/EckRoutes.php
Creates the delete bundle route.
EckRoutes::createEditBundleRoute in src/Routing/EckRoutes.php
Creates the edit bundle route.

File

src/Routing/EckRoutes.php, line 125

Class

EckRoutes
Defines dynamic routes.

Namespace

Drupal\eck\Routing

Code

private function createBundleCrudRoute($entityTypeId, $entityTypeLabel, $path, $op) {
  $defaults = [
    '_entity_form' => "{$entityTypeId}_type.{$op}",
    '_title' => ucfirst("{$op} %type bundle"),
    '_title_arguments' => [
      '%type' => $entityTypeLabel,
    ],
  ];
  return new Route($path, $defaults, $this
    ->getBundleRouteRequirements());
}