mediawiki-skins-MinervaNeue/includes
Piotr Miazga b899286650 Encapsulate Login/profile/logout meny entry logic into AuthMenuEntry
The Growth extension would like to override the the profile link in
the main menu. We can replace the MenuEntry from group, but
modifications of each component shouldn't be allowed. That approach
is too much error prone. Furthermore it won't allow us to change
how the Login/Logout link works.

The Menu/Group accepts IMenuEntry objects, instead of building
complicated Login/Logout menu entry, let's encapsulate all that
logic into small, well-contained AuthMenuEntry object.

Now, as we have the AuthMenuEntry, we can add an `overrideProfileURL'
method to allow the profile url modifications. That approach will
allow modify profile links, and "how to modify links" logic in
one place.

Changes:
 - extracted Definitions::insertLogInOutMenuItem() body into new
AuthMenuEntry class
 - renamed some variables like $logoutUrl for better readability
 - introduced `AuthMenuEntry::overrideProfileUrl()` method that
allows modification of the Profile url, label and tracking code.

Bug: T222834
Change-Id: Ib7356acbd3373c7a4b591c9c133d7d02a55239b0
2019-06-05 21:17:31 +02:00
..
menu Encapsulate Login/profile/logout meny entry logic into AuthMenuEntry 2019-06-05 21:17:31 +02:00
skins Hygiene: SkinUserPageHelper should support Title = null 2019-06-04 17:17:58 +02:00
MinervaHooks.php Update: add secondary page actions submenu in AMC mode 2019-04-19 14:51:17 +00:00
MinervaUI.php Add GPL file header to PHP classes 2018-04-15 16:23:10 -07:00
ResourceLoaderLessVarFileModule.php Add GPL file header to PHP classes 2018-04-15 16:23:10 -07:00
ServiceWiring.php Provide a code structure for menus handling and add Advanced menu 2019-04-16 13:19:51 +02:00
SkinOptions.php Update: add secondary page actions submenu in AMC mode 2019-04-19 14:51:17 +00:00