public function FieldUiController::fieldListing in CiviCRM Entity 8.3
Shows the 'Manage fields' page for CiviCRM entities.
Parameters
string $entity_type_id: The entity type.
\Drupal\Core\Routing\RouteMatchInterface $route_match: The current route match.
Return value
array A render array as expected by \Drupal\Core\Render\RendererInterface::render().
File
- src/
Controller/ FieldUiController.php, line 54
Class
Namespace
Drupal\civicrm_entity\ControllerCode
public function fieldListing($entity_type_id) {
$list_builder = $this->entityTypeManager
->getListBuilder('field_config');
assert($list_builder instanceof FieldConfigListBuilder);
$bundles = $this->entityTypeBundleInfo
->getBundleInfo($entity_type_id);
// We replicate all field config across bundles, so take the first bundle
// name.
$bundle = key($bundles);
// Field UI provides parameter overrides.
return $list_builder
->render($entity_type_id, $bundle);
}