NodeTypeInterface.php 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <?php
  2. namespace Drupal\node;
  3. use Drupal\Core\Config\Entity\ConfigEntityInterface;
  4. use Drupal\Core\Entity\RevisionableEntityBundleInterface;
  5. /**
  6. * Provides an interface defining a node type entity.
  7. */
  8. interface NodeTypeInterface extends ConfigEntityInterface, RevisionableEntityBundleInterface {
  9. /**
  10. * Determines whether the node type is locked.
  11. *
  12. * @return string|false
  13. * The module name that locks the type or FALSE.
  14. */
  15. public function isLocked();
  16. /**
  17. * Gets whether a new revision should be created by default.
  18. *
  19. * @return bool
  20. * TRUE if a new revision should be created by default.
  21. *
  22. * @deprecated in Drupal 8.3.0 and will be removed before Drupal 9.0.0. Use
  23. * Drupal\Core\Entity\RevisionableEntityBundleInterface::shouldCreateNewRevision()
  24. * instead.
  25. */
  26. public function isNewRevision();
  27. /**
  28. * Sets whether a new revision should be created by default.
  29. *
  30. * @param bool $new_revision
  31. * TRUE if a new revision should be created by default.
  32. */
  33. public function setNewRevision($new_revision);
  34. /**
  35. * Gets whether 'Submitted by' information should be shown.
  36. *
  37. * @return bool
  38. * TRUE if the submitted by information should be shown.
  39. */
  40. public function displaySubmitted();
  41. /**
  42. * Sets whether 'Submitted by' information should be shown.
  43. *
  44. * @param bool $display_submitted
  45. * TRUE if the submitted by information should be shown.
  46. */
  47. public function setDisplaySubmitted($display_submitted);
  48. /**
  49. * Gets the preview mode.
  50. *
  51. * @return int
  52. * DRUPAL_DISABLED, DRUPAL_OPTIONAL or DRUPAL_REQUIRED.
  53. */
  54. public function getPreviewMode();
  55. /**
  56. * Sets the preview mode.
  57. *
  58. * @param int $preview_mode
  59. * DRUPAL_DISABLED, DRUPAL_OPTIONAL or DRUPAL_REQUIRED.
  60. */
  61. public function setPreviewMode($preview_mode);
  62. /**
  63. * Gets the help information.
  64. *
  65. * @return string
  66. * The help information of this node type.
  67. */
  68. public function getHelp();
  69. /**
  70. * Gets the description.
  71. *
  72. * @return string
  73. * The description of this node type.
  74. */
  75. public function getDescription();
  76. }