This follows up the work in T186823 and builds on the recommendations in T186823#6409592.
Desired Outcomes
- The variables MobileFormatter::$title, MobileFormatter::$topHeadingTags are no longer needed due to transformers being created inside the constructor (or passed into the constructor) https://gerrit.wikimedia.org/r/629696
- The RemoveImagesTransform is limited to the MobileViewAPI. It is not used inside normal page views. T262580: Drop support for the deprecated mobileview "noimages" api parameter
- We iterate over an array of transformers rather than calling
- The transform behaviour has been moved outside of MobileFormatter::filterContent. That method should match the function signature and behaviour of HtmlFormatter::filterContent
- T261291: Simplify MobileFormatter::filterContent (Drop $removeDefaults and $unused) arguments
- Generalize MobileFormatter to accept all valuable parameters in constructor and remove all arguments from MobileFormatter::applyTransforms T261291#6431231 (https://gerrit.wikimedia.org/r/626162)
- The MakeSectionsTransform should be generalized to take a list of transforms rather than to manually construct the LazyImageTransform and MoveLeadParagraphTransform. One way would be to pass in arrays of transforms for lead and rest (as explored in this patch) another way would be to update MoveLeadParagraphTransform and LazyImageTransform to work with the DOMelement representing the article rather than the individual sections (https://gerrit.wikimedia.org/r/625628)