TermInterface.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <?php
  2. namespace Drupal\taxonomy;
  3. use Drupal\Core\Entity\ContentEntityInterface;
  4. use Drupal\Core\Entity\EntityChangedInterface;
  5. /**
  6. * Provides an interface defining a taxonomy term entity.
  7. */
  8. interface TermInterface extends ContentEntityInterface, EntityChangedInterface {
  9. /**
  10. * Gets the term's description.
  11. *
  12. * @return string
  13. * The term description.
  14. */
  15. public function getDescription();
  16. /**
  17. * Sets the term's description.
  18. *
  19. * @param string $description
  20. * The term's description.
  21. *
  22. * @return $this
  23. */
  24. public function setDescription($description);
  25. /**
  26. * Gets the text format name for the term's description.
  27. *
  28. * @return string
  29. * The text format name.
  30. */
  31. public function getFormat();
  32. /**
  33. * Sets the text format name for the term's description.
  34. *
  35. * @param string $format
  36. * The term's description text format.
  37. *
  38. * @return $this
  39. */
  40. public function setFormat($format);
  41. /**
  42. * Gets the name of the term.
  43. *
  44. * @return string
  45. * The name of the term.
  46. */
  47. public function getName();
  48. /**
  49. * Sets the name of the term.
  50. *
  51. * @param int $name
  52. * The term's name.
  53. *
  54. * @return $this
  55. */
  56. public function setName($name);
  57. /**
  58. * Gets the weight of this term.
  59. *
  60. * @return int
  61. * The weight of the term.
  62. */
  63. public function getWeight();
  64. /**
  65. * Gets the weight of this term.
  66. *
  67. * @param int $weight
  68. * The term's weight.
  69. *
  70. * @return $this
  71. */
  72. public function setWeight($weight);
  73. /**
  74. * Get the taxonomy vocabulary id this term belongs to.
  75. *
  76. * @return string
  77. * The id of the vocabulary.
  78. *
  79. * @deprecated Scheduled for removal before Drupal 9.0.0. Use
  80. * TermInterface::bundle() instead.
  81. */
  82. public function getVocabularyId();
  83. }