You are here

function custom_formatters_update_6100 in Custom Formatters 6

Implements hook_update_N().

File

./custom_formatters.install, line 81
Install, update and uninstall functions for the Custom Formatters module.

Code

function custom_formatters_update_6100() {
  $ret = array();
  db_add_field($ret, 'formatters', 'multiple', array(
    'type' => 'int',
    'unsigned' => TRUE,
    'not null' => TRUE,
    'default' => 0,
  ));
  db_query("INSERT INTO {formatters} (name, label, field_types, multiple, description, mode, code) VALUES ('%s', '%s', '%s', %d, '%s', '%s', %b)", 'example_basic_multiples', 'Example - Basic (multiples)', serialize(array(
    'number_decimal',
    'number_float',
    'number_integer',
    'text',
  )), 1, 'An example custom formatter for an assorted group of basic field types, with support for multiple values.', 'advanced', pack('H*', '246f7574707574203d2027273b0d0a666f72656163682028656c656d656e745f6368696c6472656e2824656c656d656e742920617320246b657929207b0d0a2020246f7574707574202e3d20273c6469763e27202e2024656c656d656e745b246b65795d5b27236974656d275d5b2776616c7565275d202e20222022202e206c287428223c7375703e437573746f6d20466f726d6174746572204578616d706c653c2f7375703e22292c202761646d696e2f73657474696e67732f666f726d617474657273272c206172726179282768746d6c27203d3e20545255452929202e20273c2f6469763e273b0d0a7d0d0a72657475726e20246f75747075743b'));
  return $ret;
}