diff options
author | Joas Schilling <coding@schilljs.com> | 2016-12-01 13:35:23 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2016-12-01 13:35:23 +0300 |
commit | b2f46bfa04fdd6f205fba1a5d4011a9e5c5637dd (patch) | |
tree | 17ac8c13c32c6cfc8ceafdf1afba948870561fba /apps/systemtags/lib | |
parent | 23a525a74b38b729eed2dad90d0f6bf41d95216c (diff) |
Adjust all implementations in the server repo
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/systemtags/lib')
-rw-r--r-- | apps/systemtags/lib/Activity/Provider.php | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/apps/systemtags/lib/Activity/Provider.php b/apps/systemtags/lib/Activity/Provider.php index 37ede8c3b8f..5ef20c281bd 100644 --- a/apps/systemtags/lib/Activity/Provider.php +++ b/apps/systemtags/lib/Activity/Provider.php @@ -28,6 +28,7 @@ use OCP\IL10N; use OCP\IURLGenerator; use OCP\IUser; use OCP\IUserManager; +use OCP\L10N\IFactory; class Provider implements IProvider { @@ -38,6 +39,9 @@ class Provider implements IProvider { const ASSIGN_TAG = 'assign_tag'; const UNASSIGN_TAG = 'unassign_tag'; + /** @var IFactory */ + protected $languageFactory; + /** @var IL10N */ protected $l; @@ -54,30 +58,33 @@ class Provider implements IProvider { protected $displayNames = []; /** - * @param IL10N $l + * @param IFactory $languageFactory * @param IURLGenerator $url * @param IManager $activityManager * @param IUserManager $userManager */ - public function __construct(IL10N $l, IURLGenerator $url, IManager $activityManager, IUserManager $userManager) { - $this->l = $l; + public function __construct(IFactory $languageFactory, IURLGenerator $url, IManager $activityManager, IUserManager $userManager) { + $this->languageFactory = $languageFactory; $this->url = $url; $this->activityManager = $activityManager; $this->userManager = $userManager; } /** + * @param string $language * @param IEvent $event * @param IEvent|null $previousEvent * @return IEvent * @throws \InvalidArgumentException * @since 11.0.0 */ - public function parse(IEvent $event, IEvent $previousEvent = null) { + public function parse($language, IEvent $event, IEvent $previousEvent = null) { if ($event->getApp() !== 'systemtags') { throw new \InvalidArgumentException(); } + $this->l = $this->languageFactory->get('systemtags', $language); + if ($this->activityManager->isFormattingFilteredObject()) { try { return $this->parseShortVersion($event); |