silverstripe / silverstripe-assets

Silverstripe Assets component
BSD 3-Clause "New" or "Revised" License
9 stars 65 forks source link

File::BackLinkTracking() - Implement PolymorphicManyManyList to replace ArrayList #575

Open sabina-talipova opened 8 months ago

sabina-talipova commented 8 months ago

Description

In File, the BackLinks relationship should be turned into a polymorphic many_many relationship (using a many_many through relation as documented).

File::BackLinksTracking() would then be redundant - you'd just get the backlinks directly from the polymorphic relation.

See: https://github.com/silverstripe/silverstripe-assets/blob/27000f18654ce66e6e92e40bb220121b8d750855/src/File.php#L1304

Related