public function FacebookPublicationEntity::getFieldProperties in Facebook Autopost 7
Get the property names out of the field names associated to this entity.
Parameters
array $field_names: A numeric array containing the field names to translate.
Return value
array A keyed array with field name => property name.
File
- fb_autopost_entity/
fb_autopost_entity.module, line 555 - Module implementation file
Class
- FacebookPublicationEntity
- The class used for Facebook publication entities.
Code
public function getFieldProperties($field_names = NULL) {
if (empty($field_names)) {
// Get all the field names associated with this entity bundle.
$field_names = array_keys(field_info_instances('facebook_publication', $publication->type));
}
$output = array();
foreach ($field_names as $field_name) {
// Remove 'field_facebook_' prefix from field names.
$output[$field_name] = substr($field_name, strlen('field_facebook_'));
}
// Allow other modules to alter this default behavior.
drupal_alter('field_property_data', $output);
return $output;
}