function ConfigTest::postSave
Same name in other branches
- 8.9.x core/modules/config/tests/config_test/src/Entity/ConfigTest.php \Drupal\config_test\Entity\ConfigTest::postSave()
- 10 core/modules/config/tests/config_test/src/Entity/ConfigTest.php \Drupal\config_test\Entity\ConfigTest::postSave()
- 11.x core/modules/config/tests/config_test/src/Entity/ConfigTest.php \Drupal\config_test\Entity\ConfigTest::postSave()
Overrides EntityBase::postSave
File
-
core/
modules/ config/ tests/ config_test/ src/ Entity/ ConfigTest.php, line 97
Class
- ConfigTest
- Defines the ConfigTest configuration entity.
Namespace
Drupal\config_test\EntityCode
public function postSave(EntityStorageInterface $storage, $update = TRUE) {
// Used to test secondary writes during config sync.
if ($this->id() == 'primary') {
$secondary = $storage->create([
'id' => 'secondary',
'label' => 'Secondary Default',
]);
$secondary->save();
}
if ($this->id() == 'deleter') {
$deletee = $storage->load('deletee');
$deletee->delete();
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.