You are here

public function FieldConfigBase::isInternal in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Field/FieldConfigBase.php \Drupal\Core\Field\FieldConfigBase::isInternal()
  2. 9 core/lib/Drupal/Core/Field/FieldConfigBase.php \Drupal\Core\Field\FieldConfigBase::isInternal()

Determines whether the data value is internal.

This can be used in a scenario when it is not desirable to expose this data value 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 value

bool Whether the data value is internal.

Overrides DataDefinitionInterface::isInternal

File

core/lib/Drupal/Core/Field/FieldConfigBase.php, line 589

Class

FieldConfigBase
Base class for configurable field definitions.

Namespace

Drupal\Core\Field

Code

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();
}