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

converted contact and removed hook_views_wizard

parent ebf9c605
......@@ -5,12 +5,23 @@
* Definition of views_handler_field_contact_link.
*/
namespace Drupal\contact\Plugin\views\field;
use Drupal\user\Plugins\views\field\UserLink;
use Drupal\Core\Annotation\Plugin;
/**
* A field that links to the user contact page, if access is permitted.
*
* @ingroup views_field_handlers
*/
class views_handler_field_contact_link extends views_handler_field_user_link {
/**
* @Plugin(
* plugin_id = "contact_link"
* )
*/
class ContactLink extends UserLink {
function options_form(&$form, &$form_state) {
$form['text']['#title'] = t('Link label');
......
......@@ -15,7 +15,7 @@ function contact_views_data_alter(&$data) {
'field' => array(
'title' => t('Link to contact page'),
'help' => t('Provide a simple link to the user contact page.'),
'handler' => 'views_handler_field_contact_link',
'plugin_id' => 'contact_link',
),
);
}
......@@ -576,27 +576,3 @@ function _views_file_status($choice = NULL) {
return $status;
}
/**
* Implements hook_views_wizard().
*/
function system_views_wizard() {
$plugins['file_managed'] = array(
'name' => 'file_managed',
'base_table' => 'file_managed',
'created_column' => 'timestamp',
'class' => 'Drupal\views\Plugins\views\wizard\File',
'title' => t('Files'),
'filters' => array(
),
'path_field' => array(
'id' => 'uri',
'table' => 'file_managed',
'field' => 'uri',
'exclude' => TRUE,
'file_download_path' => TRUE,
),
);
return $plugins;
}
......@@ -538,29 +538,3 @@ function views_taxonomy_set_breadcrumb(&$breadcrumb, &$argument) {
$breadcrumb[$path] = check_plain($parent->name);
}
}
/**
* Implements hook_views_wizard().
*/
function taxonomy_views_wizard() {
$plugins['taxonomy_term'] = array(
'name' => 'taxonomy_term',
'base_table' => 'taxonomy_term_data',
'class' => 'Drupal\views\Plugins\views\wizard\TaxonomyTerm',
'title' => t('Taxonomy terms'),
'filters' => array(
),
'path_field' => array(
'id' => 'tid',
'table' => 'taxonomy_term_data',
'field' => 'tid',
'exclude' => TRUE,
'alter' => array(
'alter_text' => 1,
'text' => 'taxonomy/term/[tid]',
),
),
);
return $plugins;
}
......@@ -572,36 +572,3 @@ function user_views_query_substitutions($view) {
global $user;
return array('***CURRENT_USER***' => intval($user->uid));
}
/**
* Implements hook_views_wizard().
*/
function user_views_wizard() {
$plugins['users'] = array(
'name' => 'users',
'base_table' => 'users',
'created_column' => 'created',
'class' => 'Drupal\views\Plugins\views\wizard\User',
'title' => t('Users'),
'filters' => array(
'status' => array(
'value' => '1',
'table' => 'users',
'field' => 'status',
),
),
'path_field' => array(
'id' => 'uid',
'table' => 'users',
'field' => 'uid',
'exclude' => TRUE,
'link_to_user' => FALSE,
'alter' => array(
'alter_text' => 1,
'text' => 'user/[uid]',
),
),
);
return $plugins;
}
......@@ -577,7 +577,6 @@ function views_ui_get_wizard($wizard_type) {
* An array of arrays with information about all available views wizards.
*/
function views_ui_get_wizards() {
ctools_include('plugins');
$manager = views_get_plugin_manager('wizard');
$wizard_plugins = $manager->getDefinitions();
$wizard_tables = array();
......
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