If I have reverse enginered it correctly:
- save is a controller function, it is in you job controller file.
- that is a decendant from the item.php in the classes/controller folder in the admin part of your component.
- in there, somewhere is: if (!$model->save($validData))
- the model, in this case, you can find in classes/model/item.php, look for the save function.
- In there is: $this->syncRelation($name, $data[$name]);
- the syncRelation function does the saving, it is also in the item.php
What you can do to get the experts:
Check the controller for job and look for the save function.
In there, there is a bit:
//Get the model through postSaveHook()
if ($this->model)
{
$model = $this->model;
$item = $model->getItem();
$model->loadRelations('classes');
$model->loadRelations('options');
}
You can fork the controller and function and change above to
//Get the model through postSaveHook()
if ($this->model)
{
$model = $this->model;
$item = $model->getItem();
$model->loadRelations('experts');
}
Then you will have the experts and you can create a loop or so to add them to the recipients. ($item->experts is probably a array of objects)