Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
d6fc9251
Commit
d6fc9251
authored
Jul 29, 2012
by
Daniel Wehner
Committed by
Tim Plunkett
Oct 21, 2012
Browse files
converted contact and removed hook_views_wizard
parent
ebf9c605
Changes
6
Hide whitespace changes
Inline
Side-by-side
lib/Drupal/contact/Plugin/views/field/
views_handler_field_c
ontact
_l
ink.
inc
→
lib/Drupal/contact/Plugin/views/field/
C
ontact
L
ink.
php
View file @
d6fc9251
...
...
@@ -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'
);
...
...
modules/contact.views.inc
View file @
d6fc9251
...
...
@@ -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'
,
),
);
}
modules/system.views.inc
View file @
d6fc9251
...
...
@@ -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
;
}
modules/taxonomy.views.inc
View file @
d6fc9251
...
...
@@ -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
;
}
modules/user.views.inc
View file @
d6fc9251
...
...
@@ -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
;
}
views_ui.module
View file @
d6fc9251
...
...
@@ -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
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment