Drop unused property and inject a service to SpecialDisplayNotificationsConfiguration

Change-Id: I0f238b863638245eef381e540da7d610d01bd25b
This commit is contained in:
Matěj Suchánek 2021-06-29 15:43:25 +02:00
parent a6dbadb006
commit 3f05f8a71b
2 changed files with 7 additions and 10 deletions

View file

@ -49,6 +49,7 @@
"DisplayNotificationsConfiguration": {
"class": "SpecialDisplayNotificationsConfiguration",
"services": [
"EchoAttributeManager",
"UserOptionsManager"
]
},

View file

@ -10,13 +10,6 @@ class SpecialDisplayNotificationsConfiguration extends UnlistedSpecialPage {
*/
protected $attributeManager;
/**
* Notification controller
*
* @var EchoNotificationController
*/
protected $notificationController;
/**
* Category names, mapping internal name to HTML-formatted name
*
@ -61,13 +54,16 @@ class SpecialDisplayNotificationsConfiguration extends UnlistedSpecialPage {
private $userOptionsManager;
/**
* @param EchoAttributeManager $attributeManager
* @param UserOptionsManager $userOptionsManager
*/
public function __construct( UserOptionsManager $userOptionsManager ) {
public function __construct(
EchoAttributeManager $attributeManager,
UserOptionsManager $userOptionsManager
) {
parent::__construct( 'DisplayNotificationsConfiguration' );
$this->attributeManager = EchoServices::getInstance()->getAttributeManager();
$this->notificationController = new EchoNotificationController();
$this->attributeManager = $attributeManager;
$this->userOptionsManager = $userOptionsManager;
}