function manage_display_base_field_info in Manage display 8
Return information about the base fields that can be managed.
Parameters
string $entity_type_id: Entity type ID to return fields for.
Return value
array Array keyed by field name with value equal to the default display options.
1 call to manage_display_base_field_info()
File
- ./
manage_display.module, line 67 - Make base fields such as 'title' available in "Manage Display".
Code
function manage_display_base_field_info($entity_type_id) {
// Node.
// - Default uid and created to hidden as that's most often correct,
// especially on teaser.
$info['node']['title'] = [
'label' => 'hidden',
'type' => 'title',
'weight' => -50,
];
$info['node']['created'] = [
'region' => 'hidden',
];
$info['node']['uid'] = [
'region' => 'hidden',
];
// User.
// - Default user name to hidden to match Drupal default.
$info['user']['name'] = [
'region' => 'hidden',
];
// Taxonomy term.
$info['taxonomy_term']['name'] = $info['node']['title'];
// Aggregator feed.
// - @todo Create new formatter for 'image' that displays the URI as an <img>
// tag with appropriate title.
$info['aggregator_feed']['title'] = $info['node']['title'];
$info['aggregator_feed']['image'] = [
'type' => 'uri_link',
'label' => 'hidden',
'weight' => 2,
];
$info['aggregator_feed']['description'] = [
'type' => 'aggregator_xss',
'label' => 'hidden',
'weight' => 3,
];
// Aggregator item.
$info['aggregator_item']['title'] = $info['node']['title'];
$info['aggregator_item']['title']['settings']['tag'] = 'h3';
$info['aggregator_item']['description'] = [
'type' => 'aggregator_xss',
'label' => 'hidden',
'weight' => 2,
];
return isset($info[$entity_type_id]) ? $info[$entity_type_id] : [];
}