8.5.x AutoIncrementingTestItem.php AutoIncrementingTestItem::getIncrementedFieldValue()
8.2.x AutoIncrementingTestItem.php AutoIncrementingTestItem::getIncrementedFieldValue()
8.3.x AutoIncrementingTestItem.php AutoIncrementingTestItem::getIncrementedFieldValue()
8.4.x AutoIncrementingTestItem.php AutoIncrementingTestItem::getIncrementedFieldValue()
8.6.x AutoIncrementingTestItem.php AutoIncrementingTestItem::getIncrementedFieldValue()

Gets an incremented field value.

Return value

int The incremented field value.

1 call to AutoIncrementingTestItem::getIncrementedFieldValue()
AutoIncrementingTestItem::preSave in core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/AutoIncrementingTestItem.php
Defines custom presave behavior for field values.

File

core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/AutoIncrementingTestItem.php, line 34

Class

AutoIncrementingTestItem
Defines the 'field_method_invocation_order_test' entity field type.

Namespace

Drupal\entity_test\Plugin\Field\FieldType

Code

private static function getIncrementedFieldValue() {
  $current_value =& drupal_static(__METHOD__, 0);
  return ++$current_value;
}