IFilter.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2016 Joas Schilling <coding@schilljs.com>
  4. *
  5. * @license GNU AGPL version 3 or any later version
  6. *
  7. * This program is free software: you can redistribute it and/or modify
  8. * it under the terms of the GNU Affero General Public License as
  9. * published by the Free Software Foundation, either version 3 of the
  10. * License, or (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU Affero General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Affero General Public License
  18. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  19. *
  20. */
  21. namespace OCP\Activity;
  22. /**
  23. * Interface IFilter
  24. *
  25. * @package OCP\Activity
  26. * @since 11.0.0
  27. */
  28. interface IFilter {
  29. /**
  30. * @return string Lowercase a-z and underscore only identifier
  31. * @since 11.0.0
  32. */
  33. public function getIdentifier();
  34. /**
  35. * @return string A translated string
  36. * @since 11.0.0
  37. */
  38. public function getName();
  39. /**
  40. * @return int whether the filter should be rather on the top or bottom of
  41. * the admin section. The filters are arranged in ascending order of the
  42. * priority values. It is required to return a value between 0 and 100.
  43. * @since 11.0.0
  44. */
  45. public function getPriority();
  46. /**
  47. * @return string Full URL to an icon, empty string when none is given
  48. * @since 11.0.0
  49. */
  50. public function getIcon();
  51. /**
  52. * @param string[] $types
  53. * @return string[] An array of allowed apps from which activities should be displayed
  54. * @since 11.0.0
  55. */
  56. public function filterTypes(array $types);
  57. /**
  58. * @return string[] An array of allowed apps from which activities should be displayed
  59. * @since 11.0.0
  60. */
  61. public function allowedApps();
  62. }