Commit cb3b6ee9 authored by dawehner's avatar dawehner Committed by tim.plunkett

Use the PSR0 handler classes in many modules

parent 45768154
......@@ -89,7 +89,7 @@ function search_views_data() {
'handler' => 'views_handler_argument_node_nid',
),
'filter' => array(
'handler' => 'views_handler_filter_equality',
'handler' => 'Drupal\views\Plugins\views\filter\Equality',
),
);
......@@ -107,7 +107,7 @@ function search_views_data() {
'handler' => 'views_handler_argument_node_nid',
),
'filter' => array(
'handler' => 'views_handler_filter_equality',
'handler' => 'Drupal\views\Plugins\views\filter\Equality',
),
);
......
......@@ -32,14 +32,14 @@ function statistics_views_data() {
'help' => t('The total number of times the node has been viewed.'),
'field' => array(
'handler' => 'views_handler_field_numeric',
'handler' => 'Drupal\views\Plugins\views\field\Numeric',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_numeric',
'handler' => 'Drupal\views\Plugins\views\filter\Numeric',
),
'sort' => array(
'handler' => 'views_handler_sort',
'handler' => 'Drupal\views\Plugins\views\sort\SortPluginBase',
),
);
......@@ -49,14 +49,14 @@ function statistics_views_data() {
'help' => t('The total number of times the node has been viewed today.'),
'field' => array(
'handler' => 'views_handler_field_numeric',
'handler' => 'Drupal\views\Plugins\views\field\Numeric',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_numeric',
'handler' => 'Drupal\views\Plugins\views\filter\Numeric',
),
'sort' => array(
'handler' => 'views_handler_sort',
'handler' => 'Drupal\views\Plugins\views\sort\SortPluginBase',
),
);
......@@ -66,14 +66,14 @@ function statistics_views_data() {
'help' => t('The most recent time the node has been viewed.'),
'field' => array(
'handler' => 'views_handler_field_date',
'handler' => 'Drupal\views\Plugins\views\field\Date',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_date',
'handler' => 'Drupal\views\Plugins\views\filter\Date',
),
'sort' => array(
'handler' => 'views_handler_sort',
'handler' => 'Drupal\views\Plugins\views\sort\SortPluginBase',
),
);
......@@ -104,19 +104,19 @@ function statistics_views_data() {
'title' => t('Aid'),
'help' => t('Unique access event ID.'),
'field' => array(
'handler' => 'views_handler_field_numeric',
'handler' => 'Drupal\views\Plugins\views\field\Numeric',
'click sortable' => TRUE,
),
'argument' => array(
'handler' => 'views_handler_argument_numeric',
'handler' => 'Drupal\views\Plugins\views\argument\Numeric',
'name field' => 'wid',
'numeric' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_numeric',
'handler' => 'Drupal\views\Plugins\views\filter\Numeric',
),
'sort' => array(
'handler' => 'views_handler_sort',
'handler' => 'Drupal\views\Plugins\views\sort\SortPluginBase',
),
);
......@@ -130,13 +130,13 @@ function statistics_views_data() {
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_string',
'handler' => 'Drupal\views\Plugins\views\filter\String',
),
'argument' => array(
'handler' => 'views_handler_argument_string',
'handler' => 'Drupal\views\Plugins\views\argument\String',
),
'sort' => array(
'handler' => 'views_handler_sort',
'handler' => 'Drupal\views\Plugins\views\sort\SortPluginBase',
),
);
......@@ -150,13 +150,13 @@ function statistics_views_data() {
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_string',
'handler' => 'Drupal\views\Plugins\views\filter\String',
),
'sort' => array(
'handler' => 'views_handler_sort',
'handler' => 'Drupal\views\Plugins\views\sort\SortPluginBase',
),
'argument' => array(
'handler' => 'views_handler_argument_string',
'handler' => 'Drupal\views\Plugins\views\sort\String',
),
);
......@@ -170,10 +170,10 @@ function statistics_views_data() {
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_string',
'handler' => 'Drupal\views\Plugins\views\filter\String',
),
'sort' => array(
'handler' => 'views_handler_sort',
'handler' => 'Drupal\views\Plugins\views\sort\SortPluginBase',
),
//No argument here. Can't send forward slashes as arguments.
//Can be worked around by node ID.
......@@ -185,14 +185,14 @@ function statistics_views_data() {
'title' => t('Referrer'),
'help' => t('Referrer URI.'),
'field' => array(
'handler' => 'views_handler_field_url',
'handler' => 'Drupal\views\Plugins\views\field\Url',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_string',
'handler' => 'Drupal\views\Plugins\views\filter\String',
),
'sort' => array(
'handler' => 'views_handler_sort',
'handler' => 'Drupal\views\Plugins\views\sort\SortPluginBase',
),
);
......@@ -201,17 +201,17 @@ function statistics_views_data() {
'title' => t('Hostname'),
'help' => t('Hostname of user that visited the page.'),
'field' => array(
'handler' => 'views_handler_field',
'handler' => 'Drupal\views\Plugins\views\field\FieldPluginBase',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_string',
'handler' => 'Drupal\views\Plugins\views\filter\String',
),
'sort' => array(
'handler' => 'views_handler_sort',
'handler' => 'Drupal\views\Plugins\views\sort\SortPluginBase',
),
'argument' => array(
'handler' => 'views_handler_argument_string',
'handler' => 'Drupal\views\Plugins\views\argument\String',
),
);
......@@ -220,7 +220,7 @@ function statistics_views_data() {
'title' => t('User'),
'help' => t('The user who visited the site.'),
'relationship' => array(
'handler' => 'views_handler_relationship',
'handler' => 'Drupal\views\Plugins\views\relationship\RelationshipPluginBase',
'base' => 'users',
'base field' => 'uid',
),
......@@ -231,14 +231,14 @@ function statistics_views_data() {
'title' => t('Timer'),
'help' => t('Time in milliseconds that the page took to load.'),
'field' => array(
'handler' => 'views_handler_field_numeric',
'handler' => 'Drupal\views\Plugins\views\field\Numeric',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_numeric',
'handler' => 'Drupal\views\Plugins\views\filter\Numeric',
),
'sort' => array(
'handler' => 'views_handler_sort',
'handler' => 'Drupal\views\Plugins\views\Sort\SortPluginBase',
),
);
......@@ -247,14 +247,14 @@ function statistics_views_data() {
'title' => t('Timestamp'),
'help' => t('Timestamp of when the page was visited.'),
'field' => array(
'handler' => 'views_handler_field_date',
'handler' => 'Drupal\views\Plugins\views\field\Date',
'click sortable' => TRUE,
),
'sort' => array(
'handler' => 'views_handler_sort',
'handler' => 'Drupal\views\Plugins\views\sort\SortPluginBase',
),
'filter' => array(
'handler' => 'views_handler_filter_date',
'handler' => 'Drupal\views\Plugins\views\filter\Date',
),
);
......
......@@ -30,7 +30,7 @@ function translation_views_data_alter(&$data) {
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_numeric',
'handler' => 'Drupal\views\Plugins\views\field\Numeric',
),
'argument' => array(
'handler' => 'views_handler_argument_node_tnid',
......@@ -39,14 +39,14 @@ function translation_views_data_alter(&$data) {
'validate type' => 'tnid',
),
'sort' => array(
'handler' => 'views_handler_sort',
'handler' => 'Drupal\views\Plugins\views\sort\SortPluginBase',
),
'relationship' => array(
'title' => t('Source translation'),
'help' => t('The source that this content was translated from.'),
'base' => 'node',
'base field' => 'nid',
'handler' => 'views_handler_relationship',
'handler' => 'Drupal\views\Plugins\views\relationship\RelationshipPluginBase',
'label' => t('Source translation'),
),
);
......@@ -94,11 +94,11 @@ function translation_views_data_alter(&$data) {
'title' => t('Translation status'),
'help' => t('The translation status of the content - whether or not the translation needs to be updated.'),
'field' => array(
'handler' => 'views_handler_field_boolean',
'handler' => 'Drupal\views\Plugins\views\field\Boolean',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_boolean_operator',
'handler' => 'Drupal\views\Plugins\views\filter\BooleanOperator',
'label' => t('Outdated'),
'type' => 'yes-no',
),
......
......@@ -59,12 +59,12 @@ function user_views_data() {
'handler' => 'views_handler_filter_user_name',
),
'sort' => array(
'handler' => 'views_handler_sort',
'handler' => 'Drupal\views\Plugins\views\sort\SortPluginBase',
),
'relationship' => array(
'title' => t('Content authored'),
'help' => t('Relate content to the user who created it. This relationship will create one record for each content item created by the user.'),
'handler' => 'views_handler_relationship',
'handler' => 'Drupal\views\Plugins\views\relationship\RelationshipPluginBase',
'base' => 'node',
'base field' => 'uid',
'field' => 'uid',
......@@ -78,7 +78,7 @@ function user_views_data() {
'real field' => 'uid',
'filter' => array(
'title' => t('The user ID'),
'handler' => 'views_handler_filter_numeric',
'handler' => 'Drupal\views\Plugins\views\filter\Numeric',
),
);
......@@ -88,7 +88,7 @@ function user_views_data() {
'title' => t('Representative node'),
'label' => t('Representative node'),
'help' => t('Obtains a single representative node for each user, according to a chosen sort criterion.'),
'handler' => 'views_handler_relationship_groupwise_max',
'handler' => 'Drupal\views\Plugins\views\relationship\GroupwiseMax',
'relationship field' => 'uid',
'outer field' => 'users.uid',
'argument table' => 'users',
......@@ -118,13 +118,13 @@ function user_views_data() {
'click sortable' => TRUE,
),
'sort' => array(
'handler' => 'views_handler_sort',
'handler' => 'Drupal\views\Plugins\views\sort\SortPluginBase',
),
'argument' => array(
'handler' => 'views_handler_argument_string',
'handler' => 'Drupal\views\Plugins\views\argument\String',
),
'filter' => array(
'handler' => 'views_handler_filter_string',
'handler' => 'Drupal\views\Plugins\views\filter\String',
'title' => t('Name (raw)'),
'help' => t('The user or author name. This filter does not check if the user exists and allows partial matching. Does not utilize autocomplete.')
),
......@@ -140,13 +140,13 @@ function user_views_data() {
'click sortable' => TRUE,
),
'sort' => array(
'handler' => 'views_handler_sort',
'handler' => 'Drupal\views\Plugins\views\sort\SortPluginBase',
),
'filter' => array(
'handler' => 'views_handler_filter_string',
'handler' => 'Drupal\views\Plugins\views\filter\String',
),
'argument' => array(
'handler' => 'views_handler_argument_string',
'handler' => 'Drupal\views\Plugins\views\argument\String',
),
);
......@@ -159,7 +159,7 @@ function user_views_data() {
'click sortable' => TRUE,
),
'sort' => array(
'handler' => 'views_handler_sort',
'handler' => 'Drupal\views\Plugins\views\sort\SortPluginBase',
),
'filter' => array(
'handler' => 'views_handler_filter_node_language',
......@@ -180,10 +180,10 @@ function user_views_data() {
'click sortable' => TRUE,
),
'sort' => array(
'handler' => 'views_handler_sort',
'handler' => 'Drupal\views\Plugins\views\sort\SortPluginBase',
),
'filter' => array(
'handler' => 'views_handler_filter_boolean_operator',
'handler' => 'Drupal\views\Plugins\views\filter\BooleanOperator',
'label' => t('Has Avatar'),
'type' => 'yes-no',
),
......@@ -203,14 +203,14 @@ function user_views_data() {
'title' => t('Created date'), // The item it appears as on the UI,
'help' => t('The date the user was created.'), // The help that appears on the UI,
'field' => array(
'handler' => 'views_handler_field_date',
'handler' => 'Drupal\views\Plugins\views\field\Date',
'click sortable' => TRUE,
),
'sort' => array(
'handler' => 'views_handler_sort_date',
'handler' => 'Drupal\views\Plugins\views\sort\Date',
),
'filter' => array(
'handler' => 'views_handler_filter_date',
'handler' => 'Drupal\views\Plugins\views\filter\Date',
),
);
......@@ -274,14 +274,14 @@ function user_views_data() {
'title' => t('Last access'), // The item it appears as on the UI,
'help' => t("The user's last access date."), // The help that appears on the UI,
'field' => array(
'handler' => 'views_handler_field_date',
'handler' => 'Drupal\views\Plugins\views\field\Date',
'click sortable' => TRUE,
),
'sort' => array(
'handler' => 'views_handler_sort_date',
'handler' => 'Drupal\views\Plugins\views\sort\Date',
),
'filter' => array(
'handler' => 'views_handler_filter_date',
'handler' => 'Drupal\views\Plugins\views\filter\Date',
),
);
......@@ -290,14 +290,14 @@ function user_views_data() {
'title' => t('Last login'), // The item it appears as on the UI,
'help' => t("The user's last login date."), // The help that appears on the UI,
'field' => array(
'handler' => 'views_handler_field_date',
'handler' => 'Drupal\views\Plugins\views\field\Date',
'click sortable' => TRUE,
),
'sort' => array(
'handler' => 'views_handler_sort_date',
'handler' => 'Drupal\views\Plugins\views\sort\Date',
),
'filter' => array(
'handler' => 'views_handler_filter_date',
'handler' => 'Drupal\views\Plugins\views\filter\Date',
),
);
......@@ -307,19 +307,19 @@ function user_views_data() {
'help' => t('Whether a user is active or blocked.'), // The help that appears on the UI,
// Information for displaying a title as a field
'field' => array(
'handler' => 'views_handler_field_boolean',
'handler' => 'Drupal\views\Plugins\views\field\Boolean',
'click sortable' => TRUE,
'output formats' => array(
'active-blocked' => array(t('Active'), t('Blocked')),
),
),
'filter' => array(
'handler' => 'views_handler_filter_boolean_operator',
'handler' => 'Drupal\views\Plugins\views\filter\BooleanOperator',
'label' => t('Active'),
'type' => 'yes-no',
),
'sort' => array(
'handler' => 'views_handler_sort',
'handler' => 'Drupal\views\Plugins\views\sort\SortPluginBase',
),
);
......@@ -329,11 +329,11 @@ function user_views_data() {
'help' => t("The user's signature."), // The help that appears on the UI,
// Information for displaying a title as a field
'field' => array(
'handler' => 'views_handler_field_markup',
'handler' => 'Drupal\views\Plugins\views\field\Markup',
'format' => filter_fallback_format(),
),
'filter' => array(
'handler' => 'views_handler_filter_string',
'handler' => 'Drupal\views\Plugins\views\filter\String',
),
);
......@@ -357,7 +357,7 @@ function user_views_data() {
'title' => t('Data'),
'help' => t('Provide serialized data of the user'),
'field' => array(
'handler' => 'views_handler_field_serialized',
'handler' => 'Drupal\views\Plugins\views\field\Serialized',
),
);
......@@ -485,14 +485,14 @@ function user_views_data() {
'title' => t('Authmap ID'),
'help' => t('The Authmap ID.'),
'field' => array(
'handler' => 'views_handler_field_numeric',
'handler' => 'Drupal\views\Plugins\views\field\Numeric',
),
'filter' => array(
'handler' => 'views_handler_filter_numeric',
'handler' => 'Drupal\views\Plugins\views\filter\Numeric',
'numeric' => TRUE,
),
'argument' => array(
'handler' => 'views_handler_argument_numeric',
'handler' => 'Drupal\views\Plugins\views\argument\Numeric',
'numeric' => TRUE,
),
);
......@@ -500,26 +500,26 @@ function user_views_data() {
'title' => t('Authentication name'),
'help' => t('The unique authentication name.'),
'field' => array(
'handler' => 'views_handler_field',
'handler' => 'Drupal\views\Plugins\views\field\FieldPluginBase',
),
'filter' => array(
'handler' => 'views_handler_filter_string',
'handler' => 'Drupal\views\Plugins\views\filter\String',
),
'argument' => array(
'handler' => 'views_handler_argument_string',
'handler' => 'Drupal\views\Plugins\views\argument\Numeric',
),
);
$data['authmap']['module'] = array(
'title' => t('Authentication module'),
'help' => t('The name of the module managing the authentication entry.'),
'field' => array(
'handler' => 'views_handler_field',
'handler' => 'Drupal\views\Plugins\views\field\FieldNumeric',
),
'filter' => array(
'handler' => 'views_handler_filter_string',
'handler' => 'Drupal\views\Plugins\views\filter\String',
),
'argument' => array(
'handler' => 'views_handler_argument_string',
'handler' => 'Drupal\views\Plugins\views\argment\String',
),
);
......
......@@ -10,26 +10,26 @@
/**
* Implements hook_views_data().
*/
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.
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(),
);
);
$data['views']['random'] = array(
$data['views']['random'] = array(
'title' => t('Random'),
'help' => t('Randomize the display order.'),
'sort' => array(
'handler' => 'views_handler_sort_random',
),
);
'handler' => 'Drupal\views\Plugins\views\sort\Random',
),
);
$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(
'handler' => 'views_handler_argument_null',
'handler' => 'Drupal\views\Plugins\views\argument\Null',
),
);
......@@ -37,7 +37,7 @@ function views_views_data() {
'title' => t('Custom text'),
'help' => t('Provide custom text or link.'),
'field' => array(
'handler' => 'views_handler_field_custom',
'handler' => 'Drupal\views\Plugins\views\field\Custom',
),
);
......@@ -45,7 +45,7 @@ function views_views_data() {
'title' => t('View result counter'),
'help' => t('Displays the actual position of the view result'),
'field' => array(
'handler' => 'views_handler_field_counter',
'handler' => 'Drupal\views\Plugins\views\field\Counter',
),
);
......@@ -53,7 +53,7 @@ function views_views_data() {
'title' => t('Text area'),
'help' => t('Provide markup text for the area.'),
'area' => array(
'handler' => 'views_handler_area_text',
'handler' => 'Drupal\views\Plugins\views\area\Text',
),
);
......@@ -69,7 +69,7 @@ function views_views_data() {
'title' => t('View area'),
'help' => t('Insert a view inside an area.'),
'area' => array(
'handler' => 'views_handler_area_view',
'handler' => 'Drupal\views\Plugins\views\area\View',
),
);
......@@ -77,7 +77,7 @@ function views_views_data() {
'title' => t('Result summary'),
'help' => t('Shows result summary, for example the items per page.'),
'area' => array(
'handler' => 'views_handler_area_result',
'handler' => 'Drupal\views\Plugins\views\area\Result',
),
);
......@@ -86,7 +86,7 @@ function views_views_data() {
'title' => t('Contextual Links'),
'help' => t('Display fields in a contextual links menu.'),
'field' => array(
'handler' => 'views_handler_field_contextual_links',
'handler' => 'Drupal\views\Plugins\views\field\ContextualLinks',
),
);
}
......@@ -95,7 +95,7 @@ function views_views_data() {
'title' => t('Combine fields filter'),
'help' => t('Combine two fields together and search by them.'),
'filter' => array(
'handler' => 'views_handler_filter_combine',
'handler' => 'Drupal\views\Plugins\views\filter\Combine',
),
);
......@@ -104,7 +104,7 @@ function views_views_data() {
'title' => t('Math expression'),
'help' => t('Evaluates a mathematical expression and displays it.'),
'field' => array(
'handler' => 'views_handler_field_math',
'handler' => 'Drupal\views\Plugins\views\field\Math',
'float' => TRUE,
),
);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment