mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 21:23:43 +08:00
c197daa04c
This commit adds two new getters to the category model: - `displayName` - `descriptionText` These getters are used instead of `name` and `description_text` where appropriate. On top of this two transformers have been added to allow plugins to alter these getters: ```javascript api.registerValueTransformer( "category-display-name", ({ value, context }) => value + "-" + context.category.id + "-transformed" ); ``` ```javascript api.registerValueTransformer( "category-description-text", ({ value, context }) => value + "-" + context.category.id + "-transformed" ); ``` |
||
---|---|---|
.. | ||
assets | ||
controllers | ||
helpers | ||
jobs | ||
mailers | ||
models | ||
serializers | ||
services | ||
views |