public function Mock::hookEntityPresave in Realistic Dummy Content 8.2
Same name and namespace in other branches
- 7.2 api/src/Framework/Mock.php \Drupal\realistic_dummy_content_api\Framework\Mock::hookEntityPresave()
1 call to Mock::hookEntityPresave()
- Mock::newEntity in api/
src/ Framework/ Mock.php
File
- api/
src/ Framework/ Mock.php, line 27
Class
- Mock
- Represents a mock framework (experimental).
Namespace
Drupal\realistic_dummy_content_api\FrameworkCode
public function hookEntityPresave($entity, $type) {
$this
->print('[info] About to save ' . $this
->toString($entity) . ' of type ' . $type);
if (realistic_dummy_content_api_is_dummy($entity, $type)) {
$this
->print('[info] Determined that ' . $this
->toString($entity) . ' of type ' . $type . ' is dummy, about to improve it');
realistic_dummy_content_api_improve_dummy_content($entity, $type);
}
}