View source
<?php
function sf_user_views_default_views() {
$view = new view();
$view->name = 'salesforce_api_users';
$view->description = 'Displays Salesforce integration data for Users.';
$view->tag = 'Salesforce';
$view->view_php = '';
$view->base_table = 'users';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = TRUE;
$handler = $view
->new_display('default', 'Defaults', 'default');
$handler
->override_option('fields', array(
'uid' => array(
'label' => 'Uid',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_user' => 1,
'exclude' => 0,
'id' => 'uid',
'table' => 'users',
'field' => 'uid',
'relationship' => 'none',
),
'sfid' => array(
'label' => 'Salesforce Object ID',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'exclude' => 0,
'id' => 'sfid',
'table' => 'salesforce_object_map',
'field' => 'sfid',
'relationship' => 'none',
),
'created' => array(
'label' => 'Created',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'date_format' => 'small',
'custom_date_format' => '',
'exclude' => 0,
'id' => 'created',
'table' => 'salesforce_object_map',
'field' => 'created',
'relationship' => 'none',
),
'last_export' => array(
'label' => 'Exported',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'date_format' => 'small',
'custom_date_format' => '',
'exclude' => 0,
'id' => 'last_export',
'table' => 'salesforce_object_map',
'field' => 'last_export',
'relationship' => 'none',
),
'last_import' => array(
'label' => 'Import',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'date_format' => 'small',
'custom_date_format' => '',
'exclude' => 0,
'id' => 'last_import',
'table' => 'salesforce_object_map',
'field' => 'last_import',
'relationship' => 'none',
),
));
$handler
->override_option('sorts', array(
'last_export' => array(
'order' => 'DESC',
'granularity' => 'minute',
'id' => 'last_export',
'table' => 'salesforce_object_map',
'field' => 'last_export',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'last_import' => array(
'order' => 'DESC',
'granularity' => 'minute',
'id' => 'last_import',
'table' => 'salesforce_object_map',
'field' => 'last_import',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
));
$handler
->override_option('filters', array(
'sfid' => array(
'operator' => 'not empty',
'value' => '',
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'case' => 1,
'id' => 'sfid',
'table' => 'salesforce_object_map',
'field' => 'sfid',
'relationship' => 'none',
),
'sfid_1' => array(
'operator' => 'contains',
'value' => '',
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'sfid_1_op',
'identifier' => 'sfid_1',
'label' => 'Salesforce Object ID',
'optional' => 1,
'remember' => 0,
),
'case' => 0,
'id' => 'sfid_1',
'table' => 'salesforce_object_map',
'field' => 'sfid',
'relationship' => 'none',
),
));
$handler
->override_option('access', array(
'type' => 'perm',
'perm' => 'administer salesforce',
));
$handler
->override_option('cache', array(
'type' => 'none',
));
$handler
->override_option('title', 'Salesforce - User object syncing');
$handler
->override_option('items_per_page', 50);
$handler
->override_option('use_pager', '1');
$handler
->override_option('style_plugin', 'table');
$handler
->override_option('style_options', array(
'grouping' => '',
'override' => 1,
'sticky' => 0,
'order' => 'asc',
'columns' => array(
'sfid' => 'sfid',
'created' => 'created',
'last_export' => 'last_export',
'last_import' => 'last_import',
),
'info' => array(
'sfid' => array(
'sortable' => 1,
'separator' => '',
),
'created' => array(
'sortable' => 1,
'separator' => '',
),
'last_export' => array(
'sortable' => 1,
'separator' => '',
),
'last_import' => array(
'sortable' => 1,
'separator' => '',
),
),
'default' => '-1',
));
$handler = $view
->new_display('page', 'Page', 'page_1');
$handler
->override_option('path', 'admin/content/salesforce/users');
$handler
->override_option('menu', array(
'type' => 'normal',
'title' => 'Salesforce / User Integration',
'description' => '',
'weight' => '0',
'name' => 'admin',
));
$handler
->override_option('tab_options', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
'name' => 'navigation',
));
$views[$view->name] = $view;
return $views;
}