function FieldUI::getRouteBundleParameter
Same name in other branches
- 8.9.x core/modules/field_ui/src/FieldUI.php \Drupal\field_ui\FieldUI::getRouteBundleParameter()
- 10 core/modules/field_ui/src/FieldUI.php \Drupal\field_ui\FieldUI::getRouteBundleParameter()
- 11.x core/modules/field_ui/src/FieldUI.php \Drupal\field_ui\FieldUI::getRouteBundleParameter()
Gets the route parameter that should be used for Field UI routes.
Parameters
\Drupal\Core\Entity\EntityTypeInterface $entity_type: The actual entity type, not the bundle (e.g. the content entity type).
string $bundle: The bundle name.
Return value
array An array that can be used a route parameter.
8 calls to FieldUI::getRouteBundleParameter()
- EntityFormDisplayEditForm::getOverviewUrl in core/
modules/ field_ui/ src/ Form/ EntityFormDisplayEditForm.php - Returns the Url object for a specific entity (form) display edit form.
- EntityViewDisplayEditForm::getOverviewUrl in core/
modules/ field_ui/ src/ Form/ EntityViewDisplayEditForm.php - Returns the Url object for a specific entity (form) display edit form.
- FieldConfigEditForm::actions in core/
modules/ field_ui/ src/ Form/ FieldConfigEditForm.php - Returns an array of supported actions for the current entity form.
- FieldConfigListBuilder::buildRow in core/
modules/ field_ui/ src/ FieldConfigListBuilder.php - Builds a row for an entity in the entity listing.
- FieldStorageAddForm::submitForm in core/
modules/ field_ui/ src/ Form/ FieldStorageAddForm.php - Form submission handler.
File
-
core/
modules/ field_ui/ src/ FieldUI.php, line 78
Class
- FieldUI
- Static service container wrapper for Field UI.
Namespace
Drupal\field_uiCode
public static function getRouteBundleParameter(EntityTypeInterface $entity_type, $bundle) {
$bundle_parameter_key = $entity_type->getBundleEntityType() ?: 'bundle';
return [
$bundle_parameter_key => $bundle,
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.