Commit 82c9aff7 authored by catch's avatar catch
Browse files

Issue #2101709 by tstoeckler: Remove the bundle_prefix concept from the entity system.

parent e8fb3e6e
......@@ -243,13 +243,6 @@ class EntityType extends Plugin {
*/
public $route_base_path;
/**
* The prefix for the bundles of this entity type.
*
* @var string (optional)
*/
public $bundle_prefix;
/**
* The base menu router path to which the entity admin user interface responds.
*
......
......@@ -403,10 +403,6 @@ public function getAdminPath($entity_type, $bundle) {
$entity_info = $this->getDefinition($entity_type);
// Check for an entity type's admin base path.
if (isset($entity_info['route_base_path'])) {
// If the entity type has a bundle prefix, strip it out of the path.
if (isset($entity_info['bundle_prefix'])) {
$bundle = str_replace($entity_info['bundle_prefix'], '', $bundle);
}
// Replace any dynamic 'bundle' portion of the path with the actual bundle.
$admin_path = str_replace('{bundle}', $bundle, $entity_info['route_base_path']);
}
......@@ -430,9 +426,6 @@ public function getAdminPath($entity_type, $bundle) {
*/
public function getAdminRouteInfo($entity_type, $bundle) {
$entity_info = $this->getDefinition($entity_type);
if (isset($entity_info['bundle_prefix'])) {
$bundle = str_replace($entity_info['bundle_prefix'], '', $bundle);
}
return array(
'route_name' => "field_ui.overview_$entity_type",
'route_parameters' => array(
......
......@@ -75,9 +75,6 @@ public static function create(ContainerInterface $container) {
*/
public function buildForm(array $form, array &$form_state, $entity_type = NULL, $bundle = NULL) {
$entity_info = $this->entityManager->getDefinition($entity_type);
if (!empty($entity_info['bundle_prefix'])) {
$bundle = $entity_info['bundle_prefix'] . $bundle;
}
$this->entity_type = $entity_type;
$this->bundle = $bundle;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment