/**
* Provides an interface for an entity type and its metadata.
*
- * Additional information can be provided by modules: hook_entity_type_build() can be
- * implemented to define new properties, while hook_entity_type_alter() can be
- * implemented to alter existing data and fill-in defaults. Module-specific
- * properties should be documented in the hook implementations defining them.
+ * Entity type classes can provide docblock annotations. The entity type manager
+ * will use these annotations to populate the entity type object with
+ * properties.
+ *
+ * Additional properties can be defined by module implementations of
+ * hook_entity_type_build(). Existing data can be altered in implementations of
+ * hook_entity_type_alter(), which can also be used to fill in defaults.
+ * Module-specific properties should be documented in the hook implementations
+ * defining them.
+ *
+ * @see \Drupal\Core\Entity\EntityTypeManagerInterface
+ * @see hook_entity_type_build()
+ * @see hook_entity_type_alter()
*/
interface EntityTypeInterface extends PluginDefinitionInterface {
public function getAccessControlClass();
/**
- * Gets the access class.
+ * Sets the access control handler class.
*
* @param string $class
- * The class for this entity type's access.
+ * The class for this entity type's access control handler.
*
* @return $this
*/
/**
* 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();
*/
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.
*