function title_test_entity_info in Title 7
Implements hook_entity_info().
File
- tests/
title_test.module, line 11 - Testing functionality for Title module.
Code
function title_test_entity_info() {
$info = array();
$field = array(
'type' => 'text',
'cardinality' => 1,
'translatable' => TRUE,
);
$instance = array(
'required' => TRUE,
'settings' => array(
'text_processing' => 0,
),
'widget' => array(
'weight' => -5,
),
);
$info['test_entity'] = array(
'entity keys' => array(
'label' => 'ftlabel',
),
'field replacement' => array(
'ftlabel' => array(
'field' => $field,
'instance' => array(
'label' => t('Title'),
'description' => t('A field replacing node title.'),
) + $instance,
),
),
'controller class' => 'EntityAPIController',
);
return $info;
}