You are here

function patch_manager_instance_info in Patch manager 7

2 calls to patch_manager_instance_info()
patch_manager_install in ./patch_manager.install
Implements hook_schema().
patch_manager_update_7100 in ./patch_manager.install
Adding field_patch_notes field into database storage.

File

./patch_manager.install, line 118
Install, update and uninstall functions for the Patch manager module.

Code

function patch_manager_instance_info() {

  // We are going to return an array of field instances.
  $instances = array();

  // field_patch_notes instance
  $instances['field_patch_notes'] = array(
    'label' => 'Patch notes',
    'widget' => array(
      'weight' => '41',
      'type' => 'text_textarea',
      'active' => 1,
      'settings' => array(
        'rows' => '5',
      ),
    ),
    'settings' => array(
      'text_processing' => '0',
      'user_register_form' => FALSE,
    ),
    'display' => array(
      'default' => array(
        'label' => 'above',
        'type' => 'text_default',
        'settings' => array(),
        'weight' => 3,
      ),
      'teaser' => array(
        'type' => 'hidden',
        'label' => 'above',
        'settings' => array(),
        'weight' => 0,
      ),
    ),
    'required' => 0,
    'description' => 'Optional notes for this patch, why is this patch necessary for this site? When can be removed?',
    'default_value' => NULL,
    'field_name' => 'field_patch_notes',
    'entity_type' => 'node',
    'bundle' => 'patch',
  );

  // field_patch instance
  $instances['field_patch'] = array(
    'label' => 'Patch file',
    'widget' => array(
      'weight' => '-4',
      'type' => 'file_generic',
      'active' => 1,
      'settings' => array(
        'progress_indicator' => 'throbber',
      ),
    ),
    'settings' => array(
      'file_directory' => 'patches',
      'file_extensions' => 'txt diff patch',
      'max_filesize' => '',
      'description_field' => 0,
      'user_register_form' => FALSE,
    ),
    'display' => array(
      'default' => array(
        'label' => 'above',
        'type' => 'file_default',
        'settings' => array(),
        'weight' => 0,
      ),
      'teaser' => array(
        'type' => 'hidden',
        'label' => 'above',
        'settings' => array(),
        'weight' => 0,
      ),
    ),
    'required' => 1,
    'description' => '',
    'field_name' => 'field_patch',
    'entity_type' => 'node',
    'bundle' => 'patch',
  );

  // field_module instance
  $instances['field_module'] = array(
    'label' => 'Module',
    'widget' => array(
      'weight' => '-3',
      'type' => 'text_textfield',
      'active' => 1,
      'settings' => array(
        'size' => '60',
      ),
    ),
    'settings' => array(
      'text_processing' => '0',
      'user_register_form' => FALSE,
    ),
    'display' => array(
      'default' => array(
        'label' => 'above',
        'type' => 'text_default',
        'settings' => array(),
        'weight' => 1,
      ),
      'teaser' => array(
        'type' => 'hidden',
        'label' => 'above',
        'settings' => array(),
        'weight' => 0,
      ),
    ),
    'required' => 1,
    'description' => 'Use the system name of module. For example, <b>feeds_tamper</b>.',
    'default_value' => NULL,
    'field_name' => 'field_module',
    'entity_type' => 'node',
    'bundle' => 'patch',
  );

  // field_drupal_issue instance
  $instances['field_drupal_issue'] = array(
    'label' => 'Drupal.org issue number',
    'widget' => array(
      'weight' => '-2',
      'type' => 'text_textfield',
      'active' => 1,
      'settings' => array(
        'size' => '60',
      ),
    ),
    'settings' => array(
      'text_processing' => '0',
      'user_register_form' => FALSE,
    ),
    'display' => array(
      'default' => array(
        'label' => 'above',
        'type' => 'text_default',
        'settings' => array(),
        'weight' => 2,
      ),
      'teaser' => array(
        'type' => 'hidden',
        'label' => 'above',
        'settings' => array(),
        'weight' => 0,
      ),
    ),
    'required' => 0,
    'description' => '',
    'default_value' => NULL,
    'field_name' => 'field_drupal_issue',
    'entity_type' => 'node',
    'bundle' => 'patch',
  );
  return $instances;
}