Skip to content
Snippets Groups Projects
Unverified Commit 813c80e7 authored by Wim Leers's avatar Wim Leers Committed by Mateu Aguiló Bosch
Browse files

Issue #3039600 by Wim Leers, e0ipso: Update JSON:API Extras' route for...

Issue #3039600 by Wim Leers, e0ipso: Update JSON:API Extras' route for compatibility with JSON:API 2.4
parent 6b5ea572
No related branches found
No related tags found
No related merge requests found
entity.jsonapi_resource_config.collection:
title: JSON:API Overwrites
description: 'Overwrite JSON:API resources.'
parent: system.admin_config_services
route_name: entity.jsonapi_resource_config.collection
jsonapi_extras.resources:
title: 'Resources'
route_name: entity.jsonapi_resource_config.collection
base_route: entity.jsonapi_resource_config.collection
jsonapi_extras.settings:
# @todo this one should be defined in Drupal core in principle.
jsonapi.settings:
route_name: jsonapi.settings
base_route: jsonapi.settings
title: 'Settings'
parent: system.admin_config_services
# Define a "JSON:API Extras tab" to contain all of its subtabs.
jsonapi.settings.extras:
route_name: jsonapi_extras.settings
base_route: jsonapi.settings
title: 'JSON:API Extras'
# The two subtabs.
jsonapi.settings.extras.settings:
route_name: jsonapi_extras.settings
base_route: jsonapi_extras.settings
title: 'Settings'
parent_id: jsonapi.settings.extras
jsonapi.settings.extras.resources:
route_name: entity.jsonapi_resource_config.collection
base_route: entity.jsonapi_resource_config.collection
title: 'Resource overrides'
parent_id: jsonapi.settings.extras
......@@ -14,8 +14,8 @@ function jsonapi_extras_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'entity.jsonapi_resource_config.collection':
$output = '';
$output .= '<p>' . t('The following table shows the list of JSON:API resources available.') . '</p>';
$output .= '<p>' . t("Use the overwrite operation to overwrite a resource's configuration. You can revert back to the default configuration using the revert operation.") . '</p>';
$output .= '<p>' . t('The following table shows the list of JSON:API resource types available.') . '</p>';
$output .= '<p>' . t("Use the overwrite operation to overwrite a resource type's configuration. You can revert back to the default configuration using the revert operation.") . '</p>';
return $output;
}
}
......
jsonapi_extras.settings:
path: '/admin/config/services/jsonapi/settings'
path: '/admin/config/services/jsonapi/extras'
defaults:
_form: '\Drupal\jsonapi_extras\Form\JsonapiExtrasSettingsForm'
_title: 'Settings'
_title: 'JSON:API Extras'
requirements:
_permission: 'administer site configuration'
......@@ -11,7 +11,14 @@ use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
*
* @ConfigEntityType(
* id = "jsonapi_resource_config",
* label = @Translation("JSON:API Resource Config"),
* label = @Translation("JSON:API Resource override"),
* label_collection = @Translation("JSON:API Resource overrides"),
* label_singular = @Translation("JSON:API resource override"),
* label_plural = @Translation("JSON:API resource overrides"),
* label_count = @PluralTranslation(
* singular = "@count JSON:API resource override",
* plural = "@count JSON:API resource overrides",
* ),
* handlers = {
* "list_builder" = "Drupal\jsonapi_extras\JsonapiResourceConfigListBuilder",
* "form" = {
......@@ -32,10 +39,10 @@ use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
* "uuid" = "uuid"
* },
* links = {
* "add-form" = "/admin/config/services/jsonapi/add/{entity_type_id}/{bundle}",
* "edit-form" = "/admin/config/services/jsonapi/{jsonapi_resource_config}/edit",
* "delete-form" = "/admin/config/services/jsonapi/{jsonapi_resource_config}/delete",
* "collection" = "/admin/config/services/jsonapi"
* "add-form" = "/admin/config/services/jsonapi/add/resource_types/{entity_type_id}/{bundle}",
* "edit-form" = "/admin/config/services/jsonapi/resource_types/{jsonapi_resource_config}/edit",
* "delete-form" = "/admin/config/services/jsonapi/resource_types/{jsonapi_resource_config}/delete",
* "collection" = "/admin/config/services/jsonapi/resource_types"
* }
* )
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment