chg: [component:CRUD] Added `afterFind` support in add
parent
57835b8e52
commit
aead79a4c3
|
@ -309,6 +309,9 @@ class CRUDComponent extends Component
|
||||||
if ($this->metaFieldsSupported()) {
|
if ($this->metaFieldsSupported()) {
|
||||||
$metaTemplates = $this->getMetaTemplates();
|
$metaTemplates = $this->getMetaTemplates();
|
||||||
$data = $this->attachMetaTemplatesIfNeeded($data, $metaTemplates->toArray());
|
$data = $this->attachMetaTemplatesIfNeeded($data, $metaTemplates->toArray());
|
||||||
|
if (isset($params['afterFind'])) {
|
||||||
|
$data = $params['afterFind']($data, $params);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ($this->request->is('post')) {
|
if ($this->request->is('post')) {
|
||||||
$patchEntityParams = [
|
$patchEntityParams = [
|
||||||
|
|
Loading…
Reference in New Issue