function _sbp_attach_object_fields in Search by Page 7
Returns an array of the given fields on the given object.
2 calls to _sbp_attach_object_fields()
- sbp_attach_sbp_details in ./
sbp_attach.module - Implements Search by Page hook_sbp_details().
- sbp_attach_sbp_paths in ./
sbp_attach.module - Implements Search by Page hook_sbp_paths().
File
- ./
sbp_attach.module, line 535 - Module file for Search by Page Attachments, a sub-module for Search by Page.
Code
function _sbp_attach_object_fields($obj, $field_name) {
$fields = $obj->{$field_name};
$objlang = LANGUAGE_NONE;
if (isset($obj->language) && $obj->language) {
$objlang = $obj->language;
}
if (isset($fields[$objlang])) {
return $fields[$objlang];
}
if (isset($fields[LANGUAGE_NONE])) {
return $fields[LANGUAGE_NONE];
}
return array();
}