You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This proposal comes forward from several bug reports, primarily from Chinese users, that slugs don’t work in their resources. #145, #167, among others.
While the workaround is to use the name property which then gets slugged, it’s better to have a more systematic approach. For this I propose to add a static method to the Tab class:
The signature of the closure: (Tab $tab): string (could be enforced with a PHPStan or Psalm annotation)
During construction of the slug, the Tab class is checked if the passes closure is set and if so, used. Otherwise it will default to its current behaviour.
This proposal comes forward from several bug reports, primarily from Chinese users, that slugs don’t work in their resources. #145, #167, among others.
While the workaround is to use the name property which then gets slugged, it’s better to have a more systematic approach. For this I propose to add a static method to the Tab class:
The signature of the closure:
(Tab $tab): string
(could be enforced with a PHPStan or Psalm annotation)During construction of the slug, the Tab class is checked if the passes closure is set and if so, used. Otherwise it will default to its current behaviour.
The closure can be passed in a service provider:
The text was updated successfully, but these errors were encountered: