silverstripe / silverstripe-framework

Silverstripe Framework, the MVC framework that powers Silverstripe CMS
https://www.silverstripe.org
BSD 3-Clause "New" or "Revised" License
720 stars 820 forks source link

Move `ViewableData::Me()` out of `ViewableData` and into the template layer #11261

Open GuySartorelli opened 1 month ago

GuySartorelli commented 1 month ago

The ViewableData::Me() method just returns $this. It only exists as a way for the template layer to refer to the current item in scope. This should be moved into the template layer.

I originally did this as part of https://github.com/silverstripe/silverstripe-framework/pull/11244 but I had to remove it (see https://github.com/silverstripe/silverstripe-framework/compare/f9e757a0a201799dbb1d2535c90e2cb309982026..29793a31415d01c4173cb560e7d97f399d270971) because it was causing some failures in the kitchen sink.

Acceptance criteria

PRs