comparison vendor/chi-teck/drupal-code-generator/templates/d7/hook/field_info.twig @ 0:c75dbcec494b

Initial commit from drush-created site
author Chris Cannam
date Thu, 05 Jul 2018 14:24:15 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:c75dbcec494b
1 /**
2 * Implements hook_field_info().
3 */
4 function {{ machine_name }}_field_info() {
5 return array(
6 'text' => array(
7 'label' => t('Text'),
8 'description' => t('This field stores varchar text in the database.'),
9 'settings' => array('max_length' => 255),
10 'instance_settings' => array('text_processing' => 0),
11 'default_widget' => 'text_textfield',
12 'default_formatter' => 'text_default',
13 ),
14 'text_long' => array(
15 'label' => t('Long text'),
16 'description' => t('This field stores long text in the database.'),
17 'settings' => array('max_length' => ''),
18 'instance_settings' => array('text_processing' => 0),
19 'default_widget' => 'text_textarea',
20 'default_formatter' => 'text_default',
21 ),
22 'text_with_summary' => array(
23 'label' => t('Long text and summary'),
24 'description' => t('This field stores long text in the database along with optional summary text.'),
25 'settings' => array('max_length' => ''),
26 'instance_settings' => array('text_processing' => 1, 'display_summary' => 0),
27 'default_widget' => 'text_textarea_with_summary',
28 'default_formatter' => 'text_summary_or_trimmed',
29 ),
30 );
31 }