You are here

function _openlayers_test_content_definition in Openlayers 6.2

Same name and namespace in other branches
  1. 7.2 tests/openlayers_test.install \_openlayers_test_content_definition()

Get content type definition with fields.

Retireives content type definition and fields as exported from CCK.

1 call to _openlayers_test_content_definition()
openlayers_test_install in tests/openlayers_test.install
Implementation of hook_install().

File

tests/openlayers_test.install, line 79
This file holds the functions for the installing and enabling of the openlayers_test module.

Code

function _openlayers_test_content_definition() {
  $content['type'] = array(
    'name' => 'OpenLayers Test Type',
    'type' => 'openlayers_test_type',
    'description' => 'This is a content type for testing OpenLayers functionality.',
    'title_label' => 'Title',
    'body_label' => 'Body',
    'min_word_count' => '0',
    'help' => '',
    'node_options' => array(
      'status' => TRUE,
      'promote' => FALSE,
      'sticky' => FALSE,
      'revision' => FALSE,
    ),
    'old_type' => 'openlayers_test_type',
    'orig_type' => 'openlayers_test_type',
    'module' => 'node',
    'custom' => '1',
    'modified' => '1',
    'locked' => '1',
    'comment' => 2,
    'comment_default_mode' => 4,
    'comment_default_order' => 1,
    'comment_default_per_page' => 50,
    'comment_controls' => 3,
    'comment_anonymous' => 0,
    'comment_subject_field' => 1,
    'comment_preview' => 1,
    'comment_form_location' => 0,
  );
  $content['fields'] = array(
    0 => array(
      'label' => 'OpenLayers Test WKT',
      'field_name' => 'field_openlayers_test_wkt',
      'type' => 'openlayers_wkt',
      'widget_type' => 'openlayers_wkt_widget',
      'change' => 'Change basic information',
      'weight' => '31',
      'openlayers_cck_preset_map' => 'default',
      'description' => 'This is some help text for this field.',
      'default_value' => array(
        0 => array(
          'openlayers_wkt' => '',
        ),
      ),
      'default_value_php' => '',
      'default_value_widget' => NULL,
      'group' => FALSE,
      'required' => 0,
      'multiple' => '0',
      'openlayers_cck_feature_types' => array(
        'point' => 'point',
        'path' => 'path',
        'polygon' => 'polygon',
      ),
      'op' => 'Save field settings',
      'module' => 'openlayers_cck',
      'widget_module' => 'openlayers_cck',
      'columns' => array(
        'openlayers_wkt' => array(
          'type' => 'text',
          'size' => 'big',
          'not null' => FALSE,
          'sortable' => TRUE,
          'views' => TRUE,
        ),
      ),
      'display_settings' => array(
        'label' => array(
          'format' => 'above',
          'exclude' => 0,
        ),
        'teaser' => array(
          'format' => 'default',
          'exclude' => 0,
        ),
        'full' => array(
          'format' => 'default',
          'exclude' => 0,
        ),
        4 => array(
          'format' => 'default',
          'exclude' => 0,
        ),
      ),
    ),
  );
  $content['extra'] = array(
    'title' => '-5',
    'body_field' => '0',
    'revision_information' => '20',
    'comment_settings' => '30',
    'menu' => '-2',
  );
  return $content;
}