Change record status: 
Project: 
Introduced in branch: 
8.x
Description: 

The EntityManager provided a method getAdminPath() that claimed to: Returns the administration path for an entity type's bundle.
It also had a getAdminRouteInfo() method that was supposedly the route-based equivalent.

However, getAdminPath() actually was tied directly to Field UI, and would result in a completely different path.

That method is now called getOverviewRouteInfo(), and is a static method on the \Drupal\field_ui\FieldUI class.

The getAdminRouteInfo() method continues to function as expected, and getAdminPath() has been removed.

Before:

$form_state->setRedirectUrl(Url::createFromPath($this->entityManager->getAdminPath($entity_type_id, $bundle)));

After:

use Drupal\field_ui\FieldUI;

$form_state->setRedirect(FieldUI::getOverviewRouteInfo($entity_type_id, $bundle));
Impacts: 
Module developers

Comments

mradcliffe’s picture

Url::createFrompath() has been removed.