protected function getAddPageRoute(EntityTypeInterface
$entity_type) { if ($entity_type->
hasLinkTemplate('add-page'
) &&
$entity_type->
getKey('bundle'
)) { $route =
new Route($entity_type->
getLinkTemplate('add-page'
));
$route->
setDefault('_controller', EntityController::
class D '::addPage'
);
$route->
setDefault('_title_callback', EntityController::
class D '::addTitle'
);
$route->
setDefault('entity_type_id',
$entity_type->
id());
$route->
setRequirement('_entity_create_any_access',
$entity_type->
id());
return $route;
} } /**
* Gets the add-form route.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type.
*
* @return \Symfony\Component\Routing\Route|null
* The generated route, if available.
*/