protected function FieldInstance::prepareSave

Prepares the instance definition for saving.

2 calls to FieldInstance::prepareSave()
FieldInstance::saveNew in drupal/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/FieldInstance.php
Saves a new field instance definition.
FieldInstance::saveUpdated in drupal/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/FieldInstance.php
Saves an updated field instance definition.

File

drupal/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/FieldInstance.php, line 427
Contains \Drupal\field\Plugin\Core\Entity\FieldInstance.

Class

FieldInstance
Defines the Field instance entity.

Namespace

Drupal\field\Plugin\Core\Entity

Code

protected function prepareSave() {
  $field_type_info = field_info_field_types($this->field->type);

  // Set the default instance settings.
  $this->settings += $field_type_info['instance_settings'];
}