[Vtigercrm-developers] Extend getInstanceById()?
Alan Lord
alanslists at gmail.com
Thu Dec 10 13:31:17 GMT 2020
On 10/12/2020 12:28, Alan Lord wrote:
>
> Is this design choice deliberate? Is there another way?
>
Perhaps add a "callback" parameter, e.g. getInstanceById($record,
$moduleName, $cb)
Such that after the object is instantiated, the callback is triggered?
something like:
>
$instance->setData($focus->column_fields)->set('id',$recordId)->setModuleFromInstance($module)->setEntity($focus);
> if(method_exists($instance, $cb)) {
> return $instance->$cb()...
> }
> return $instance;
perhaps?
More information about the vtigercrm-developers
mailing list