Closed (fixed)
Project:
Braintree Cashier
Version:
8.x-2.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Nov 2018 at 19:34 UTC
Updated:
31 Dec 2018 at 22:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
brunodboComment #3
shaundychkoFollowing the lead of Drupal Commerce, entities that aren't seen by users, such as Payment, have routes without the
/adminprefix. See the route provider for Payment https://cgit.drupalcode.org/commerce/tree/modules/payment/src/Entity/Pay... for example.Comment #4
brunodboFor the routes without admin prefix, should we follow the template of
/{entity_type}/add,/{entity_type}/edit, ...? For the admin ones (collections), we could use the plural of the entity type id? So for billing plans, this would become something like:Comment #5
shaundychkoWhat does Drupal Commerce do? We should do the same.
Comment #6
brunodbo- For routes to publicly visible entities, Commerce follows the pattern
/{entity_type_id}/{entity}, e.g.,/product/{commerce_product}(https://cgit.drupalcode.org/commerce/tree/modules/product/src/Entity/Pro...)- For routes to non-publicly visible entities, Commerce follows the pattern /admin/commerce/{entity_type_id_shorthand_plural}/{entity}, e.g.,
/admin/commerce/orders/{commerce_order}(https://cgit.drupalcode.org/commerce/tree/modules/order/src/Entity/Order...)So in our case:
Comment #8
shaundychkoThanks for checking into that. I also update paths for the Views in
config/installand added an update hook to rebuild the routes. Thanks for the patch.Comment #9
brunodboThanks! I was going to update the collection routes in the patch, so they would be
/admin/braintree-cashier/billing-plans,/admin/braintree-cashier/discounts, etc.Does that sounds good? If so, do you prefer a reroll here, or a follow up issue?
Comment #10
shaundychkoSure, that sounds fine, thanks. Let's please open a new issue if you don't mind.
Comment #11
brunodboPosted a follow up at #3021086: Make entity route urls consistent.