You are here

function emfield_field_columns in Embedded Media Field 5

Same name and namespace in other branches
  1. 6.3 deprecated/emfield-deprecated.inc \emfield_field_columns()
  2. 6 emfield.module \emfield_field_columns()
  3. 6.2 emfield.module \emfield_field_columns()

File

./emfield.module, line 126

Code

function emfield_field_columns() {
  $columns = array(
    'embed' => array(
      'type' => 'longtext',
      'not null' => TRUE,
      'default' => "''",
      'sortable' => TRUE,
    ),
    'value' => array(
      'type' => 'varchar',
      'length' => 255,
      'not null' => TRUE,
      'default' => "''",
      'sortable' => TRUE,
    ),
    'provider' => array(
      'type' => 'varchar',
      'length' => 255,
      'not null' => TRUE,
      'default' => "''",
      'sortable' => TRUE,
    ),
    'data' => array(
      'type' => 'longtext',
      'not null' => TRUE,
      'default' => "''",
      'sortable' => FALSE,
    ),
  );
  foreach (module_implements('emfield_field_columns_extra') as $module) {
    $extra = module_invoke($module, 'emfield_field_columns_extra');
    if (is_array($extra)) {

      //print_r($extra);
      $columns = array_merge($columns, $extra);
    }
  }
  return $columns;
}