2009-05-17 11:16:51 +00:00
< ? php
/**
* @ file
* Provide views data and handlers that aren ' t tied to any other module .
*
* @ ingroup views_module_handlers
*/
/**
* Implements hook_views_data () .
*/
2012-08-19 13:19:00 +00:00
function views_views_data () {
$data [ 'views' ][ 'table' ][ 'group' ] = t ( 'Global' );
$data [ 'views' ][ 'table' ][ 'join' ] = array (
// #global is a special flag which let's a table appear all the time.
'#global' => array (),
);
2009-05-17 11:16:51 +00:00
2012-08-19 13:19:00 +00:00
$data [ 'views' ][ 'random' ] = array (
'title' => t ( 'Random' ),
'help' => t ( 'Randomize the display order.' ),
'sort' => array (
'id' => 'random' ,
),
);
2009-05-17 11:16:51 +00:00
$data [ 'views' ][ 'null' ] = array (
'title' => t ( 'Null' ),
'help' => t ( 'Allow a contextual filter value to be ignored. The query will not be altered by this contextual filter value. Can be used when contextual filter values come from the URL, and a part of the URL needs to be ignored.' ),
'argument' => array (
2012-08-11 11:46:07 +00:00
'id' => 'null' ,
2009-05-17 11:16:51 +00:00
),
);
$data [ 'views' ][ 'nothing' ] = array (
'title' => t ( 'Custom text' ),
'help' => t ( 'Provide custom text or link.' ),
'field' => array (
2012-08-11 11:46:07 +00:00
'id' => 'custom' ,
2009-05-17 11:16:51 +00:00
),
);
$data [ 'views' ][ 'counter' ] = array (
'title' => t ( 'View result counter' ),
'help' => t ( 'Displays the actual position of the view result' ),
'field' => array (
2012-08-11 11:46:07 +00:00
'id' => 'counter' ,
2009-05-17 11:16:51 +00:00
),
);
$data [ 'views' ][ 'area' ] = array (
'title' => t ( 'Text area' ),
'help' => t ( 'Provide markup text for the area.' ),
'area' => array (
2012-08-11 11:46:07 +00:00
'id' => 'text' ,
2009-05-17 11:16:51 +00:00
),
);
2012-07-29 21:44:28 +00:00
$data [ 'views' ][ 'area_text_custom' ] = array (
'title' => t ( 'Unfiltered text' ),
'help' => t ( 'Add unrestricted, custom text or markup. This is similar to the custom text field.' ),
'area' => array (
2012-08-11 11:46:07 +00:00
'id' => 'text_custom' ,
2012-07-29 21:44:28 +00:00
),
);
2012-07-17 16:56:36 +00:00
2009-05-17 11:16:51 +00:00
$data [ 'views' ][ 'view' ] = array (
'title' => t ( 'View area' ),
'help' => t ( 'Insert a view inside an area.' ),
'area' => array (
2012-08-11 11:46:07 +00:00
'id' => 'view' ,
2009-05-17 11:16:51 +00:00
),
);
$data [ 'views' ][ 'result' ] = array (
'title' => t ( 'Result summary' ),
'help' => t ( 'Shows result summary, for example the items per page.' ),
'area' => array (
2012-08-11 11:46:07 +00:00
'id' => 'result' ,
2009-05-17 11:16:51 +00:00
),
);
if ( module_exists ( 'contextual' )) {
$data [ 'views' ][ 'contextual_links' ] = array (
'title' => t ( 'Contextual Links' ),
'help' => t ( 'Display fields in a contextual links menu.' ),
'field' => array (
2012-08-11 11:46:07 +00:00
'id' => 'contextual_links' ,
2009-05-17 11:16:51 +00:00
),
);
}
$data [ 'views' ][ 'combine' ] = array (
'title' => t ( 'Combine fields filter' ),
'help' => t ( 'Combine two fields together and search by them.' ),
'filter' => array (
2012-08-11 11:46:07 +00:00
'id' => 'combine' ,
2009-05-17 11:16:51 +00:00
),
);
return $data ;
}