function FieldTestItem::mustResave
Same name and namespace in other branches
- 9 core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/FieldTestItem.php \Drupal\entity_test\Plugin\Field\FieldType\FieldTestItem::mustResave()
- 10 core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/FieldTestItem.php \Drupal\entity_test\Plugin\Field\FieldType\FieldTestItem::mustResave()
- 11.x core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/FieldTestItem.php \Drupal\entity_test\Plugin\Field\FieldType\FieldTestItem::mustResave()
Checks whether the field item value should be resaved.
Return value
bool TRUE if the item should be resaved, FALSE otherwise.
2 calls to FieldTestItem::mustResave()
- FieldTestItem::postSave in core/
modules/ system/ tests/ modules/ entity_test/ src/ Plugin/ Field/ FieldType/ FieldTestItem.php - Defines custom post-save behavior for field values.
- FieldTestItem::preSave in core/
modules/ system/ tests/ modules/ entity_test/ src/ Plugin/ Field/ FieldType/ FieldTestItem.php - Defines custom presave behavior for field values.
File
-
core/
modules/ system/ tests/ modules/ entity_test/ src/ Plugin/ Field/ FieldType/ FieldTestItem.php, line 108
Class
- FieldTestItem
- Defines the 'field_test' entity field type.
Namespace
Drupal\entity_test\Plugin\Field\FieldTypeCode
protected function mustResave() {
return $this->getValue()['value'] == 'resave';
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.