function commerce_file_license_status_default in Commerce File 7
Return default status with highest weight
2 calls to commerce_file_license_status_default()
- commerce_file_license_form in includes/
commerce_file_license.forms.inc - Form callback: create or edit a license.
- commerce_file_license_issue_by_host_form in includes/
commerce_file_license.forms.inc - Returns the base form array for issuing licenses on a host entity
File
- includes/
commerce_file.entities.inc, line 579 - Handles file licenses and file license logs
Code
function commerce_file_license_status_default($property = NULL) {
$default =& drupal_static(__FUNCTION__);
if (!isset($default)) {
$default = array();
if ($defaults = commerce_file_license_statuses(array(
'default' => TRUE,
))) {
$default = reset($defaults);
}
}
if (isset($property)) {
return isset($default[$property]) ? $default[$property] : NULL;
}
return $default;
}