chg: [component:CRUD] Added `afterFind` support in add

refacto/CRUDComponent
Sami Mokaddem 2023-02-24 15:20:29 +01:00
parent 57835b8e52
commit aead79a4c3
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 3 additions and 0 deletions

View File

@ -309,6 +309,9 @@ class CRUDComponent extends Component
if ($this->metaFieldsSupported()) {
$metaTemplates = $this->getMetaTemplates();
$data = $this->attachMetaTemplatesIfNeeded($data, $metaTemplates->toArray());
if (isset($params['afterFind'])) {
$data = $params['afterFind']($data, $params);
}
}
if ($this->request->is('post')) {
$patchEntityParams = [