function reference_table_formatter_entityreference::renderable_properties in Reference Table Formatter 7
Get a list of properties off the target entity which are renderable.
Make plugin authors explicity define which properties can be rendered so that sensitive information isn't leaked accidently or without a trusted role. A good example is the password on a user reference.
Return value
array An array of properties on the target entity which can be rendered.
Overrides reference_table_formatter_base_type::renderable_properties
File
- plugins/
reference_types/ entityreference.inc, line 42
Class
- reference_table_formatter_entityreference
- Class reference_table_formatter_field_collection
Code
function renderable_properties() {
$entity_name = $this
->entity_name();
$common_properties = array(
'node' => array(
'title',
),
'user' => array(
'name',
),
'taxonomy_term' => array(
'name',
),
);
return isset($common_properties[$entity_name]) ? $common_properties[$entity_name] : array();
}