function party_get_crm_controller in Party 8.2
Get the attached entity controller for a party.
Parameters
Party $party: The party to get the data set for.
$data_set_name: The name of a data set.
Return value
The controller class, without attached entities loaded yet.
28 calls to party_get_crm_controller()
- PartyController::setPrimaryFields in includes/
party.entity.inc - Set the primary fields for the party.
- PartyDefaultDataSetUIAdd::action_form in includes/
party.data_ui.inc - Provides the action form for adding a new entity.
- PartyDefaultDataSetUIAdd::action_form_submit in includes/
party.data_ui.inc - Form submission for the action form.
- PartyDefaultDataSetUIAdd::get_page_title in includes/
party.data_ui.inc - The page title for the action form.
- PartyDefaultDataSetUIAttach::get_page_title in includes/
party.data_ui.inc - The page title for the action form.
File
- ./
party.module, line 744 - Provides a generic CRM party entity.
Code
function party_get_crm_controller(Party $party, $data_set_name) {
// If we don't already have our data set, load it.
if (!isset($party->data_set_controllers[$data_set_name])) {
$sets = party_get_data_set_info();
// @todo: error handling
$class = $sets[$data_set_name]['class'];
$party->data_set_controllers[$data_set_name] = new $class($data_set_name, $party);
}
return $party->data_set_controllers[$data_set_name];
}