function casetracker_project_options in Case Tracker 6
Same name and namespace in other branches
- 7 casetracker.module \casetracker_project_options()
API function that returns valid project options.
4 calls to casetracker_project_options()
- casetracker_actions_set_project_action_form in casetracker_actions/
casetracker_actions.module - Select a project for the Set Project action
- casetracker_case_form_common in ./
casetracker.module - Common form elements for cases, generic enough for use either in a full node display, or in comment displays and updating. Default values are calculated based on an existing $form['nid']['#value'].
- casetracker_form_alter in ./
casetracker.module - Implementation of hook_form_alter().
- casetracker_views_handler_filter_project_options::get_value_options in includes/
casetracker_views_handler_filter_project_options.inc
3 string references to 'casetracker_project_options'
- casetracker_settings in ./
casetracker_admin.inc - Configures the various Case Tracker options; system_settings_form().
- casetracker_views_default_views in ./
casetracker.views_default.inc - Implementation of hook_views_default_views().
- _view_casetracker_project_options in ./
casetracker.views_default.inc
File
- ./
casetracker.module, line 951 - Enables the handling of projects and their cases.
Code
function casetracker_project_options() {
$projects = array();
// Fetch the views list of projects, which is space-aware.
if ($view = views_get_view(variable_get('casetracker_view_project_options', 'casetracker_project_options'))) {
$view
->set_display();
$view
->set_items_per_page(0);
$view
->execute();
foreach ($view->result as $row) {
$projects[$row->nid] = $row->node_title;
}
}
return $projects;
}