SystemTag.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2016, ownCloud, Inc.
  4. *
  5. * @author Joas Schilling <coding@schilljs.com>
  6. * @author Vincent Petry <pvince81@owncloud.com>
  7. *
  8. * @license AGPL-3.0
  9. *
  10. * This code is free software: you can redistribute it and/or modify
  11. * it under the terms of the GNU Affero General Public License, version 3,
  12. * as published by the Free Software Foundation.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU Affero General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU Affero General Public License, version 3,
  20. * along with this program. If not, see <http://www.gnu.org/licenses/>
  21. *
  22. */
  23. namespace OC\SystemTag;
  24. use OCP\SystemTag\ISystemTag;
  25. class SystemTag implements ISystemTag {
  26. /**
  27. * @var string
  28. */
  29. private $id;
  30. /**
  31. * @var string
  32. */
  33. private $name;
  34. /**
  35. * @var bool
  36. */
  37. private $userVisible;
  38. /**
  39. * @var bool
  40. */
  41. private $userAssignable;
  42. /**
  43. * Constructor.
  44. *
  45. * @param string $id tag id
  46. * @param string $name tag name
  47. * @param bool $userVisible whether the tag is user visible
  48. * @param bool $userAssignable whether the tag is user assignable
  49. */
  50. public function __construct($id, $name, $userVisible, $userAssignable) {
  51. $this->id = $id;
  52. $this->name = $name;
  53. $this->userVisible = $userVisible;
  54. $this->userAssignable = $userAssignable;
  55. }
  56. /**
  57. * {@inheritdoc}
  58. */
  59. public function getId() {
  60. return $this->id;
  61. }
  62. /**
  63. * {@inheritdoc}
  64. */
  65. public function getName() {
  66. return $this->name;
  67. }
  68. /**
  69. * {@inheritdoc}
  70. */
  71. public function isUserVisible() {
  72. return $this->userVisible;
  73. }
  74. /**
  75. * {@inheritdoc}
  76. */
  77. public function isUserAssignable() {
  78. return $this->userAssignable;
  79. }
  80. }