profileMenuEntry = new ProfileMenuEntry( $user ); $entries = $user->isRegistered() ? [ $this->profileMenuEntry ] : [ new LogInMenuEntry( $messageLocalizer, $authLinksQuery ) ]; parent::__construct( $entries ); } /** * @inheritDoc */ public function getName() { return 'auth'; } /** * @inheritDoc */ public function overrideProfileURL( $customURL, $customLabel = null, $trackingCode = null ) { $this->profileMenuEntry->overrideProfileURL( $customURL, $customLabel, $trackingCode ); return $this; } }