silverstripe / silverstripe-linkfield

Silverstripe module for managing links
BSD 3-Clause "New" or "Revised" License
4 stars 14 forks source link

Add config option so more esoteric link types can be removed from list of default link #212

Closed maxime-rainville closed 4 months ago

maxime-rainville commented 5 months ago

By default, all link types are available in a LinkField. If a developer wants to disable a specific Link type, they have to do so for each instance of LinkField.

There could be some situation where this is not advisable. e.g. A link type is meant to be an "abstract" parent class for child classes or an esoteric link type only makes sense in a specific context.

Acceptance criteria

PR

GuySartorelli commented 5 months ago

Link is disable by default. All other built-in Link subclasses are enabled by default.

I think Link should just be explicitly excluded at all times. This makes it both easier to implement this config flag in a sensible way, and means people won't go "Ooh I can turn Link on" and have a non-funcitonal link implementation that doesn't actually link to anything.

sabina-talipova commented 4 months ago

PR's merged. Task is completed.