You are here

function field_kaltura_field_settings in Kaltura 5

Same name and namespace in other branches
  1. 6.2 plugins/field_kaltura/field_kaltura.module \field_kaltura_field_settings()
  2. 6 plugins/field_kaltura/field_kaltura.module \field_kaltura_field_settings()

Implementation of hook_field_settings().

File

plugins/field_kaltura/field_kaltura.module, line 57
kaltura integration module - functions to provide kaltura as CCK field

Code

function field_kaltura_field_settings($op, $field) {
  switch ($op) {
    case 'form':
      $form = array();

      // specific field setting can come here (taxonomy integration/player selection/etc...)
      $form['thumbsize'] = array(
        '#type' => 'fieldset',
        '#title' => t('Thumbnail Dimensions'),
        '#description' => t('Note - these settings will only apply when choosing "Thumbnail" display'),
      );
      $form['thumbsize']['thumbsize_width'] = array(
        '#type' => 'textfield',
        '#title' => t('Thumbnail Width'),
        '#size' => 5,
        '#default_value' => !empty($field['thumbsize_width']) ? $field['thumbsize_width'] : '',
      );
      $form['thumbsize']['thumbsize_height'] = array(
        '#type' => 'textfield',
        '#title' => t('Thumbnail Height'),
        '#size' => 5,
        '#default_value' => !empty($field['thumbsize_height']) ? $field['thumbsize_height'] : '',
      );
      return $form;
    case 'save':
      return array(
        'allowed_values',
        'allowed_values_php',
        'thumbsize_height',
        'thumbsize_width',
      );
    case 'database columns':
      $columns['value'] = array(
        'type' => 'text',
        'size' => 'big',
        'not null' => FALSE,
        'sortable' => TRUE,
      );
      return $columns;
    case 'filters':
      return array(
        'like' => array(
          'operator' => 'views_handler_operator_like',
          'handler' => 'views_handler_filter_like',
        ),
      );
      break;
  }
}