involvedParties
involvedParties($data, $options = array())
Description:
Returns array of those working on the Deal.
Options:
(array) $data - the Deal.
(array) $options - not currently employed.
Example:
//
$involvedParties = $this->Deals->involvedParties($deal);
//
echo 'These people are working on this Deal: ' . implode(', ', $involvedParties) . '.';
/**
*
*
*
*
*/
public function involvedParties($data, $options = array()) {
//
$return = array();
//
if (!$data || !isset($data['User']) || empty($data['User'])) {
//
return $return;
}
//
$modelDeal = ClassRegistry::init('Users.User');
//
$return = $modelDeal->findListOfResponsibles($data['Deal']['company_id'], array('contain' => array('Group'), 'find' => 'all'));
//
return am($data['User'], $return);
}