Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / lib / Drupal / Core / Entity / EntityTypeInterface.php
index c8a28b4358f21e2eeda08015bdccf1b92d5ede92..7d994cab287beb98f3bb6b18461d149e77a8cc40 100644 (file)
@@ -547,8 +547,8 @@ interface EntityTypeInterface extends PluginDefinitionInterface {
   /**
    * Gets the label for the bundle.
    *
-   * @return string|null
-   *   The bundle label, or NULL if none exists.
+   * @return string
+   *   The bundle label.
    */
   public function getBundleLabel();
 
@@ -562,6 +562,24 @@ interface EntityTypeInterface extends PluginDefinitionInterface {
    */
   public function getBaseTable();
 
+  /**
+   * Indicates whether the entity data is internal.
+   *
+   * This can be used in a scenario when it is not desirable to expose data of
+   * this entity type to an external system.
+   *
+   * The implications of this method are left to the discretion of the caller.
+   * For example, a module providing an HTTP API may not expose entities of
+   * this type or a custom entity reference field settings form may deprioritize
+   * entities of this type in a select list.
+   *
+   * @return bool
+   *   TRUE if the entity data is internal, FALSE otherwise.
+   *
+   * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal()
+   */
+  public function isInternal();
+
   /**
    * Indicates whether entities of this type have multilingual support.
    *