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