You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SecurityFilter.php 974B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-License-Identifier: AGPL-3.0-or-later
  5. */
  6. namespace OCA\Settings\Activity;
  7. use OCP\Activity\IFilter;
  8. use OCP\IL10N;
  9. use OCP\IURLGenerator;
  10. class SecurityFilter implements IFilter {
  11. /** @var IURLGenerator */
  12. private $urlGenerator;
  13. /** @var IL10N */
  14. private $l10n;
  15. public function __construct(IURLGenerator $urlGenerator, IL10N $l10n) {
  16. $this->urlGenerator = $urlGenerator;
  17. $this->l10n = $l10n;
  18. }
  19. public function allowedApps() {
  20. return [];
  21. }
  22. public function filterTypes(array $types) {
  23. return array_intersect(['security'], $types);
  24. }
  25. public function getIcon() {
  26. return $this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core', 'actions/password.svg'));
  27. }
  28. public function getIdentifier() {
  29. return 'security';
  30. }
  31. public function getName() {
  32. return $this->l10n->t('Security');
  33. }
  34. public function getPriority() {
  35. return 30;
  36. }
  37. }