You are here

function pm_attribute_value in Drupal PM (Project Management) 7

Provides attribute value for a given domain and key.

5 calls to pm_attribute_value()
pminvoice_handler_field_invoice_status::render in pminvoice/pminvoice_handler_field_invoice_status.inc
Override render method.
pm_handler_field_attributes_domain::render in ./pm_handler_field_attributes_domain.inc
Alters views render to show attribute values rather than keys.
theme_pmproject_view in pmproject/pmproject.theme.inc
Provides HTML markup for a pmproject node view.
theme_pmtask_view in pmtask/pmtask.theme.inc
Provides HTML for the task node view.
theme_pmticket_view in pmticket/pmticket.theme.inc
Provides HTML markup for a pmticket node view.

File

./pm.module, line 1171
Main module file for the Project Management module.

Code

function pm_attribute_value($domain, $key) {
  $attributes_array = pm_attributes_bydomain($domain);
  $attributes = $attributes_array['values'];
  if (array_key_exists($key, $attributes)) {
    return $attributes[$key];
  }
  return $key;
}