You are here

function location_cck_field_settings in Location 5.3

Same name and namespace in other branches
  1. 6.3 contrib/location_cck/location_cck.module \location_cck_field_settings()
  2. 7.5 contrib/location_cck/location_cck.module \location_cck_field_settings()
  3. 7.3 contrib/location_cck/location_cck.module \location_cck_field_settings()
  4. 7.4 contrib/location_cck/location_cck.module \location_cck_field_settings()

Implementation of hook_field_settings().

File

contrib/location_cck/location_cck.module, line 22
Defines location field type.

Code

function location_cck_field_settings($op, $field) {
  switch ($op) {
    case 'form':
      $form = array();
      $settings = isset($field['location_settings']) ? $field['location_settings'] : FALSE;
      $form['location_settings'] = location_settings($settings);

      // Multiple is handled by CCK.
      unset($form['location_settings']['multiple']);
      return $form;
    case 'save':
      return array(
        'location_settings',
      );
    case 'database columns':
      return array(
        'lid' => array(
          'type' => 'int',
          'not null' => TRUE,
          'default' => '0',
        ),
      );
    case 'arguments':

      /*      $arguments = content_views_field_arguments($field);
            $alias = "content: $field[field_name]";
            $argument = array(
              'handler' => 'text_views_argument_handler',
              'option' => 'string',
              'help' => t('Set the option to the number of initial characters to filter by. Leave empty for full term; use 1 for an A/B/C style glossary.'),
            );
            $arguments[$alias] = array_merge($arguments[$alias], $argument);
            return $arguments;*/
      return;
    case 'filters':

      /*
            $allowed_values = text_allowed_values($field);
             if (count($allowed_values)) {
               return array(
                 'default' => array(
                  'list' => $allowed_values,
                   'list-type' => 'list',
                   'operator' => 'views_handler_operator_andor',
                   'value-type' => 'array',
                  ),
                );
              }
            else {
              return array(
                'like' => array(
                  'operator' => 'views_handler_operator_like',
                  'handler' => 'views_handler_filter_like',
                ),
              );
            }*/
      break;
  }
}