function AutoIncrementingTestItem::getIncrementedFieldValue
Same name in other branches
- 9 core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/AutoIncrementingTestItem.php \Drupal\entity_test\Plugin\Field\FieldType\AutoIncrementingTestItem::getIncrementedFieldValue()
- 8.9.x core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/AutoIncrementingTestItem.php \Drupal\entity_test\Plugin\Field\FieldType\AutoIncrementingTestItem::getIncrementedFieldValue()
- 11.x core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/AutoIncrementingTestItem.php \Drupal\entity_test\Plugin\Field\FieldType\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\FieldTypeCode
private static function getIncrementedFieldValue() {
static $cache = 0;
return ++$cache;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.