function ImporterTest::onPreSave
Same name and namespace in other branches
- 11.x core/tests/Drupal/KernelTests/Core/DefaultContent/ImporterTest.php \Drupal\KernelTests\Core\DefaultContent\ImporterTest::onPreSave()
Implements hook_ENTITY_TYPE_presave() for entity_test entities.
Attributes
#[Hook('entity_test_presave')]
File
-
core/
tests/ Drupal/ KernelTests/ Core/ DefaultContent/ ImporterTest.php, line 68
Class
- ImporterTest
- Tests the Default Content Importer.
Namespace
Drupal\KernelTests\Core\DefaultContentCode
public function onPreSave(ContentEntityInterface $entity) : void {
$this->wasSyncing = $entity->isSyncing();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.