Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / lib / Drupal / Core / TypedData / DataDefinition.php
index 52a4394cd78e95d9e78837530e69cd78e1a54aa0..332659feaa6d7a1b8936c4486817fb4012636605 100644 (file)
@@ -352,4 +352,28 @@ class DataDefinition implements DataDefinitionInterface, \ArrayAccess {
     return array_keys($vars);
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function isInternal() {
+    // Respect the definition, otherwise default to TRUE for computed fields.
+    if (isset($this->definition['internal'])) {
+      return $this->definition['internal'];
+    }
+    return $this->isComputed();
+  }
+
+  /**
+   * Sets the whether the data value should be internal.
+   *
+   * @param bool $internal
+   *   Whether the data value should be internal.
+   *
+   * @return $this
+   */
+  public function setInternal($internal) {
+    $this->definition['internal'] = $internal;
+    return $this;
+  }
+
 }