chg: [component:CRUD] Fixed typo
parent
a60ca95120
commit
86946719c7
|
@ -79,8 +79,7 @@ class CRUDComponent extends Component
|
||||||
}
|
}
|
||||||
if (isset($options['afterFind'])) {
|
if (isset($options['afterFind'])) {
|
||||||
$function = $options['afterFind'];
|
$function = $options['afterFind'];
|
||||||
if (is_callable($options['afterFind'])) {
|
if (is_callable($function)) {
|
||||||
$function = $options['afterFind'];
|
|
||||||
$data->each(function($value, $key) use ($function) {
|
$data->each(function($value, $key) use ($function) {
|
||||||
return $function($value);
|
return $function($value);
|
||||||
});
|
});
|
||||||
|
@ -100,8 +99,7 @@ class CRUDComponent extends Component
|
||||||
$data = $this->Controller->Paginator->paginate($query);
|
$data = $this->Controller->Paginator->paginate($query);
|
||||||
if (isset($options['afterFind'])) {
|
if (isset($options['afterFind'])) {
|
||||||
$function = $options['afterFind'];
|
$function = $options['afterFind'];
|
||||||
if (is_callable($options['afterFind'])) {
|
if (is_callable($function)) {
|
||||||
$function = $options['afterFind'];
|
|
||||||
$data->each(function($value, $key) use ($function) {
|
$data->each(function($value, $key) use ($function) {
|
||||||
return $function($value);
|
return $function($value);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue