Remove double setIcon() call for Contributions element on Toolbar

Fix Contributions element classes by not using ::create named
constructor. The constructor was provided for easier object creation
when both icon and click tracking is the same as element name.
The Contributions icon is not that case, as both tracking code and
icon are definited differently than the name, therefore we need
to initailize class, and set required attributes manually.

Change-Id: Ia91bbdcfd737a443a05fd4f61853fe8bd200e56c
This commit is contained in:
Piotr Miazga 2019-12-09 20:46:20 +01:00 committed by Pmiazga
parent acfa96e8e0
commit 7e2403c5ad

View file

@ -153,7 +153,7 @@ class ToolbarBuilder {
$pageUser = $this->userPageHelper->getPageUser();
$label = $this->messageLocalizer->msg( 'mobile-frontend-user-page-contributions' );
$entry = SingleMenuEntry::create(
$entry = new SingleMenuEntry(
'page-actions-contributions',
$label,
SpecialPage::getTitleFor( 'Contributions', $pageUser )->getLocalURL() );