function _rb_views_views_display_info in Rules Bonus Pack 7
Defines the properties of the views display data structures.
Return value
An array with the properties of view representations.
1 call to _rb_views_views_display_info()
- rb_views_rules_data_info in ./
rb_views.rules.inc - Implements hook_rules_data_info().
File
- ./
rb_views.rules.inc, line 29 - Rules plugins related to Views.
Code
function _rb_views_views_display_info($process_step = NULL) {
$data_info = array(
'machine_name' => array(
'type' => 'text',
'label' => t('Machine name'),
'sanitized' => TRUE,
),
'human_name' => array(
'type' => 'text',
'label' => t('Human-readable name'),
'sanitized' => TRUE,
),
'display' => array(
'type' => 'text',
'label' => t('Current display'),
'sanitized' => TRUE,
),
'base_table' => array(
'type' => 'text',
'label' => t('Base table'),
),
'args' => array(
'type' => 'list<text>',
'label' => t('Arguments'),
'setter callback' => 'entity_property_verbatim_set',
),
'current_page' => array(
'type' => 'integer',
'label' => t('Current page'),
'description' => t('Note that the page numbering starts on zero.'),
'setter callback' => 'entity_property_verbatim_set',
),
'items_per_page' => array(
'type' => 'integer',
'label' => t('Items per page'),
'setter callback' => 'entity_property_verbatim_set',
),
'offset' => array(
'type' => 'integer',
'label' => t('Offset'),
'description' => t('Note that this is actually starting item, meaning that you have to enter "2" to skip the first item.'),
'setter callback' => 'entity_property_verbatim_set',
),
'total_rows' => array(
'type' => 'integer',
'label' => t('Number of results'),
),
'output' => array(
'type' => 'text',
'label' => t('View output'),
'sanitized' => TRUE,
),
);
// Add all handlers to the data structure as well.
// @TODO: Make a separate data type for handlers as well.
foreach (rb_views_get_views_handlers() as $handler_type => $handler_label) {
$data_info[$handler_type] = array(
'type' => 'list<text>',
'label' => t('@handler alias', array(
'@handler' => $handler_label,
)),
);
}
return $data_info;
}