diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/views/row/Rss.php b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/views/row/Rss.php index a4c5dfc..6aaee3f 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/views/row/Rss.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/views/row/Rss.php @@ -16,7 +16,6 @@ * * @ViewsRow( * id = "aggregator_rss", - * module = "aggregator", * theme = "views_view_row_rss", * title = @Translation("Aggregator item"), * help = @Translation("Display the aggregator item using the data from the original source."), diff --git a/core/modules/block/lib/Drupal/block/Plugin/views/display/Block.php b/core/modules/block/lib/Drupal/block/Plugin/views/display/Block.php index 9a5b9fc..8f19bc3 100644 --- a/core/modules/block/lib/Drupal/block/Plugin/views/display/Block.php +++ b/core/modules/block/lib/Drupal/block/Plugin/views/display/Block.php @@ -20,7 +20,6 @@ * * @ViewsDisplay( * id = "block", - * module = "block", * title = @Translation("Block"), * help = @Translation("Display the view as a block."), * theme = "views_view", diff --git a/core/modules/comment/comment.views.inc b/core/modules/comment/comment.views.inc index 66e2083..d8887ff 100644 --- a/core/modules/comment/comment.views.inc +++ b/core/modules/comment/comment.views.inc @@ -559,5 +559,5 @@ function comment_views_data_alter(&$data) { */ function comment_views_plugins_row_alter(array &$plugins) { $plugins['entity:comment']['class'] = 'Drupal\comment\Plugin\views\row\CommentRow'; - $plugins['entity:comment']['module'] = 'comment'; + $plugins['entity:comment']['provider'] = 'comment'; } diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/views/row/Rss.php b/core/modules/comment/lib/Drupal/comment/Plugin/views/row/Rss.php index 417b286..df6d13c 100644 --- a/core/modules/comment/lib/Drupal/comment/Plugin/views/row/Rss.php +++ b/core/modules/comment/lib/Drupal/comment/Plugin/views/row/Rss.php @@ -16,7 +16,6 @@ * * @ViewsRow( * id = "comment_rss", - * module = "comment", * title = @Translation("Comment"), * help = @Translation("Display the comment as RSS."), * theme = "views_view_row_rss", diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/views/wizard/Comment.php b/core/modules/comment/lib/Drupal/comment/Plugin/views/wizard/Comment.php index 410025b..8bfb7cb 100644 --- a/core/modules/comment/lib/Drupal/comment/Plugin/views/wizard/Comment.php +++ b/core/modules/comment/lib/Drupal/comment/Plugin/views/wizard/Comment.php @@ -20,7 +20,6 @@ * * @ViewsWizard( * id = "comment", - * module = "comment", * base_table = "comment", * title = @Translation("Comments") * ) diff --git a/core/modules/file/lib/Drupal/file/Plugin/views/wizard/File.php b/core/modules/file/lib/Drupal/file/Plugin/views/wizard/File.php index 7d8c4cd..10edac4 100644 --- a/core/modules/file/lib/Drupal/file/Plugin/views/wizard/File.php +++ b/core/modules/file/lib/Drupal/file/Plugin/views/wizard/File.php @@ -16,7 +16,6 @@ * * @ViewsWizard( * id = "file_managed", - * module = "file", * base_table = "file_managed", * title = @Translation("Files") * ) diff --git a/core/modules/node/lib/Drupal/node/Plugin/views/argument_default/Node.php b/core/modules/node/lib/Drupal/node/Plugin/views/argument_default/Node.php index b981800..32a7649 100644 --- a/core/modules/node/lib/Drupal/node/Plugin/views/argument_default/Node.php +++ b/core/modules/node/lib/Drupal/node/Plugin/views/argument_default/Node.php @@ -18,7 +18,6 @@ * * @ViewsArgumentDefault( * id = "node", - * module = "node", * title = @Translation("Content ID from URL") * ) */ diff --git a/core/modules/node/lib/Drupal/node/Plugin/views/argument_validator/Node.php b/core/modules/node/lib/Drupal/node/Plugin/views/argument_validator/Node.php index 9a3f9d1..028f49e 100644 --- a/core/modules/node/lib/Drupal/node/Plugin/views/argument_validator/Node.php +++ b/core/modules/node/lib/Drupal/node/Plugin/views/argument_validator/Node.php @@ -16,7 +16,6 @@ * * @ViewsArgumentValidator( * id = "node", - * module = "node", * title = @Translation("Content") * ) */ diff --git a/core/modules/node/lib/Drupal/node/Plugin/views/row/Rss.php b/core/modules/node/lib/Drupal/node/Plugin/views/row/Rss.php index 591be15..4f7cac4 100644 --- a/core/modules/node/lib/Drupal/node/Plugin/views/row/Rss.php +++ b/core/modules/node/lib/Drupal/node/Plugin/views/row/Rss.php @@ -22,8 +22,7 @@ * theme = "views_view_row_rss", * register_theme = FALSE, * base = {"node"}, - * display_types = {"feed"}, - * module = "node" + * display_types = {"feed"} * ) */ class Rss extends RowPluginBase { diff --git a/core/modules/node/lib/Drupal/node/Plugin/views/wizard/Node.php b/core/modules/node/lib/Drupal/node/Plugin/views/wizard/Node.php index 29e6a46..c4f4d57 100644 --- a/core/modules/node/lib/Drupal/node/Plugin/views/wizard/Node.php +++ b/core/modules/node/lib/Drupal/node/Plugin/views/wizard/Node.php @@ -20,7 +20,6 @@ * * @ViewsWizard( * id = "node", - * module = "node", * base_table = "node", * title = @Translation("Content") * ) diff --git a/core/modules/node/lib/Drupal/node/Plugin/views/wizard/NodeRevision.php b/core/modules/node/lib/Drupal/node/Plugin/views/wizard/NodeRevision.php index 1d73184..33f5cf0 100644 --- a/core/modules/node/lib/Drupal/node/Plugin/views/wizard/NodeRevision.php +++ b/core/modules/node/lib/Drupal/node/Plugin/views/wizard/NodeRevision.php @@ -20,7 +20,6 @@ * * @ViewsWizard( * id = "node_revision", - * module = "node", * base_table = "node_field_revision", * title = @Translation("Content revisions") * ) diff --git a/core/modules/node/node.views.inc b/core/modules/node/node.views.inc index deacf4d..edd8ec4 100644 --- a/core/modules/node/node.views.inc +++ b/core/modules/node/node.views.inc @@ -660,5 +660,5 @@ function node_views_wizard() { */ function node_views_plugins_row_alter(array &$plugins) { $plugins['entity:node']['class'] = 'Drupal\node\Plugin\views\row\NodeRow'; - $plugins['entity:node']['module'] = 'node'; + $plugins['entity:node']['provider'] = 'node'; } diff --git a/core/modules/php/lib/Drupal/php/Plugin/views/argument_default/Php.php b/core/modules/php/lib/Drupal/php/Plugin/views/argument_default/Php.php index 491d001..84f1c76 100644 --- a/core/modules/php/lib/Drupal/php/Plugin/views/argument_default/Php.php +++ b/core/modules/php/lib/Drupal/php/Plugin/views/argument_default/Php.php @@ -17,7 +17,6 @@ * * @ViewsArgumentDefault( * id = "php", - * module = "php", * title = @Translation("PHP Code") * ) */ diff --git a/core/modules/php/lib/Drupal/php/Plugin/views/argument_validator/Php.php b/core/modules/php/lib/Drupal/php/Plugin/views/argument_validator/Php.php index c352cdc..2dfab78 100644 --- a/core/modules/php/lib/Drupal/php/Plugin/views/argument_validator/Php.php +++ b/core/modules/php/lib/Drupal/php/Plugin/views/argument_validator/Php.php @@ -17,7 +17,6 @@ * * @ViewsArgumentValidator( * id = "php", - * module = "php", * title = @Translation("PHP Code") * ) */ diff --git a/core/modules/rest/lib/Drupal/rest/Plugin/views/display/RestExport.php b/core/modules/rest/lib/Drupal/rest/Plugin/views/display/RestExport.php index 6ffdd9a..b8d7f3b 100644 --- a/core/modules/rest/lib/Drupal/rest/Plugin/views/display/RestExport.php +++ b/core/modules/rest/lib/Drupal/rest/Plugin/views/display/RestExport.php @@ -25,7 +25,6 @@ * * @ViewsDisplay( * id = "rest_export", - * module = "rest", * title = @Translation("REST export"), * help = @Translation("Create a REST export resource."), * uses_route = TRUE, diff --git a/core/modules/rest/lib/Drupal/rest/Plugin/views/row/DataEntityRow.php b/core/modules/rest/lib/Drupal/rest/Plugin/views/row/DataEntityRow.php index 2935e66..80da152 100644 --- a/core/modules/rest/lib/Drupal/rest/Plugin/views/row/DataEntityRow.php +++ b/core/modules/rest/lib/Drupal/rest/Plugin/views/row/DataEntityRow.php @@ -19,7 +19,6 @@ * * @ViewsRow( * id = "data_entity", - * module = "rest", * title = @Translation("Entity"), * help = @Translation("Use entities as row data."), * display_types = {"data"} diff --git a/core/modules/rest/lib/Drupal/rest/Plugin/views/row/DataFieldRow.php b/core/modules/rest/lib/Drupal/rest/Plugin/views/row/DataFieldRow.php index 00b900a..9622d84 100644 --- a/core/modules/rest/lib/Drupal/rest/Plugin/views/row/DataFieldRow.php +++ b/core/modules/rest/lib/Drupal/rest/Plugin/views/row/DataFieldRow.php @@ -20,7 +20,6 @@ * * @ViewsRow( * id = "data_field", - * module = "rest", * title = @Translation("Fields"), * help = @Translation("Use fields as row data."), * display_types = {"data"} diff --git a/core/modules/rest/lib/Drupal/rest/Plugin/views/style/Serializer.php b/core/modules/rest/lib/Drupal/rest/Plugin/views/style/Serializer.php index d63951f..605006a 100644 --- a/core/modules/rest/lib/Drupal/rest/Plugin/views/style/Serializer.php +++ b/core/modules/rest/lib/Drupal/rest/Plugin/views/style/Serializer.php @@ -22,7 +22,6 @@ * * @ViewsStyle( * id = "serializer", - * module = "rest", * title = @Translation("Serializer"), * help = @Translation("Serializes views row data using the Serializer component."), * display_types = {"data"} diff --git a/core/modules/search/lib/Drupal/search/Plugin/views/row/SearchRow.php b/core/modules/search/lib/Drupal/search/Plugin/views/row/SearchRow.php index 4ba8673..da2f865 100644 --- a/core/modules/search/lib/Drupal/search/Plugin/views/row/SearchRow.php +++ b/core/modules/search/lib/Drupal/search/Plugin/views/row/SearchRow.php @@ -16,7 +16,6 @@ * * @ViewsRow( * id = "search_view", - * module = "search", * title = @Translation("Search"), * help = @Translation("Provides a row plugin to display search results.") * ) diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/argument_default/Tid.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/argument_default/Tid.php index 0698737..2eb6577 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/argument_default/Tid.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/argument_default/Tid.php @@ -18,7 +18,6 @@ * * @ViewsArgumentDefault( * id = "taxonomy_tid", - * module = "taxonomy", * title = @Translation("Taxonomy term ID from URL") * ) */ diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/argument_validator/Term.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/argument_validator/Term.php index 93e6c8e..ea1fa3a 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/argument_validator/Term.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/argument_validator/Term.php @@ -18,7 +18,6 @@ * * @ViewsArgumentValidator( * id = "taxonomy_term", - * module = "taxonomy", * title = @Translation("Taxonomy term") * ) */ diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/wizard/TaxonomyTerm.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/wizard/TaxonomyTerm.php index d9409ae..a8f7fd2 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/wizard/TaxonomyTerm.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/wizard/TaxonomyTerm.php @@ -16,7 +16,6 @@ * * @ViewsWizard( * id = "taxonomy_term", - * module = "taxonomy", * base_table = "taxonomy_term_data", * title = @Translation("Taxonomy terms") * ) diff --git a/core/modules/user/lib/Drupal/user/Plugin/views/argument_default/CurrentUser.php b/core/modules/user/lib/Drupal/user/Plugin/views/argument_default/CurrentUser.php index bc9372f..024f40d 100644 --- a/core/modules/user/lib/Drupal/user/Plugin/views/argument_default/CurrentUser.php +++ b/core/modules/user/lib/Drupal/user/Plugin/views/argument_default/CurrentUser.php @@ -18,7 +18,6 @@ * * @ViewsArgumentDefault( * id = "current_user", - * module = "user", * title = @Translation("User ID from logged in user") * ) */ diff --git a/core/modules/user/lib/Drupal/user/Plugin/views/argument_default/User.php b/core/modules/user/lib/Drupal/user/Plugin/views/argument_default/User.php index 7506ab0..49ea2ee 100644 --- a/core/modules/user/lib/Drupal/user/Plugin/views/argument_default/User.php +++ b/core/modules/user/lib/Drupal/user/Plugin/views/argument_default/User.php @@ -17,7 +17,6 @@ * * @ViewsArgumentDefault( * id = "user", - * module = "user", * title = @Translation("User ID from URL") * ) */ diff --git a/core/modules/user/lib/Drupal/user/Plugin/views/argument_validator/User.php b/core/modules/user/lib/Drupal/user/Plugin/views/argument_validator/User.php index ef9956b..6596dad 100644 --- a/core/modules/user/lib/Drupal/user/Plugin/views/argument_validator/User.php +++ b/core/modules/user/lib/Drupal/user/Plugin/views/argument_validator/User.php @@ -22,7 +22,6 @@ * * @ViewsArgumentValidator( * id = "user", - * module = "user", * title = @Translation("User") * ) */ diff --git a/core/modules/user/lib/Drupal/user/Plugin/views/wizard/Users.php b/core/modules/user/lib/Drupal/user/Plugin/views/wizard/Users.php index f0121c9..1694c32 100644 --- a/core/modules/user/lib/Drupal/user/Plugin/views/wizard/Users.php +++ b/core/modules/user/lib/Drupal/user/Plugin/views/wizard/Users.php @@ -20,7 +20,6 @@ * * @ViewsWizard( * id = "users", - * module = "user", * base_table = "users", * title = @Translation("Users") * ) diff --git a/core/modules/user/user.views.inc b/core/modules/user/user.views.inc index 0a8b49b..710e84b 100644 --- a/core/modules/user/user.views.inc +++ b/core/modules/user/user.views.inc @@ -384,5 +384,5 @@ function user_views_data() { */ function user_views_plugins_row_alter(array &$plugins) { $plugins['entity:user']['class'] = 'Drupal\user\Plugin\views\row\UserRow'; - $plugins['entity:user']['module'] = 'user'; + $plugins['entity:user']['provider'] = 'user'; } diff --git a/core/modules/views/lib/Drupal/views/Annotation/ViewsPluginAnnotationBase.php b/core/modules/views/lib/Drupal/views/Annotation/ViewsPluginAnnotationBase.php index 9f265f4..baa2a76 100644 --- a/core/modules/views/lib/Drupal/views/Annotation/ViewsPluginAnnotationBase.php +++ b/core/modules/views/lib/Drupal/views/Annotation/ViewsPluginAnnotationBase.php @@ -16,13 +16,6 @@ abstract class ViewsPluginAnnotationBase extends Plugin implements AnnotationInterface { /** - * The module the plugin is defined by. - * - * @var string - */ - public $module = 'views'; - - /** * A class to make the plugin derivative aware. * * @var string diff --git a/core/modules/views/lib/Drupal/views/Plugin/Derivative/ViewsEntityRow.php b/core/modules/views/lib/Drupal/views/Plugin/Derivative/ViewsEntityRow.php index 252568d..ea8099e 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/Derivative/ViewsEntityRow.php +++ b/core/modules/views/lib/Drupal/views/Plugin/Derivative/ViewsEntityRow.php @@ -96,7 +96,7 @@ public function getDerivativeDefinitions(array $base_plugin_definition) { if (isset($entity_info['base_table']) && $this->viewsData->get($entity_info['base_table']) && $this->entityManager->hasController($entity_type, 'render')) { $this->derivatives[$entity_type] = array( 'id' => 'entity:' . $entity_type, - 'module' => 'views', + 'provider' => 'views', 'title' => $entity_info['label'], 'help' => t('Display the @label', array('@label' => $entity_info['label'])), 'base' => array($entity_info['base_table']), diff --git a/core/modules/views/lib/Drupal/views/Plugin/ViewsPluginManager.php b/core/modules/views/lib/Drupal/views/Plugin/ViewsPluginManager.php index d603fba..d55b988 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/ViewsPluginManager.php +++ b/core/modules/views/lib/Drupal/views/Plugin/ViewsPluginManager.php @@ -41,7 +41,6 @@ public function __construct($type, \Traversable $namespaces, CacheBackendInterfa $this->defaults += array( 'parent' => 'parent', 'plugin_type' => $type, - 'module' => 'views', 'register_theme' => TRUE, ); diff --git a/core/modules/views/lib/Drupal/views/Tests/ModuleTest.php b/core/modules/views/lib/Drupal/views/Tests/ModuleTest.php index 05f57e6..9d8b391 100644 --- a/core/modules/views/lib/Drupal/views/Tests/ModuleTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/ModuleTest.php @@ -11,6 +11,7 @@ * Tests basic functions from the Views module. */ use Drupal\views\Plugin\views\filter\Standard; +use Drupal\Component\Utility\String; class ModuleTest extends ViewUnitTestBase { @@ -19,7 +20,7 @@ class ModuleTest extends ViewUnitTestBase { * * @var array */ - public static $testViews = array('test_view_status'); + public static $testViews = array('test_view_status', 'test_view'); /** * Stores the last triggered error, for example via debug(). @@ -255,6 +256,26 @@ public function testViewsFetchPluginNames() { } /** + * Tests the views_plugin_list() function. + */ + public function testViewsPluginList() { + $plugin_list = views_plugin_list(); + // Only plugins used by 'test_view' should be in the plugin list. + foreach (array('display:default', 'pager:none') as $key) { + list($plugin_type, $plugin_id) = explode(':', $key); + $plugin_def = $this->container->get("plugin.manager.views.$plugin_type")->getDefinition($plugin_id); + + $this->assertTrue(isset($plugin_list[$key]), String::format('The expected @key plugin list key was found.', array('@key' => $key))); + $plugin_details = $plugin_list[$key]; + + $this->assertEqual($plugin_details['type'], $plugin_type, 'The expected plugin type was found.'); + $this->assertEqual($plugin_details['title'], $plugin_def['title'], 'The expected plugin title was found.'); + $this->assertEqual($plugin_details['provider'], $plugin_def['provider'], 'The expected plugin provider was found.'); + $this->assertTrue(in_array('test_view', $plugin_details['views']), 'The test_view View was found in the list of views using this plugin.'); + } + } + + /** * Helper to return an expected views option array. * * @param array $views diff --git a/core/modules/views/tests/modules/views_test_data/lib/Drupal/views_test_data/Plugin/views/row/RowTest.php b/core/modules/views/tests/modules/views_test_data/lib/Drupal/views_test_data/Plugin/views/row/RowTest.php index c0d6ea6..706fd65 100644 --- a/core/modules/views/tests/modules/views_test_data/lib/Drupal/views_test_data/Plugin/views/row/RowTest.php +++ b/core/modules/views/tests/modules/views_test_data/lib/Drupal/views_test_data/Plugin/views/row/RowTest.php @@ -21,7 +21,6 @@ * title = @Translation("Test row plugin"), * help = @Translation("Provides a generic row test plugin."), * theme = "views_view_row_test", - * module = "views_test_data", * display_types = {"normal", "test"} * ) */ diff --git a/core/modules/views/tests/modules/views_test_data/lib/Drupal/views_test_data/Plugin/views/style/MappingTest.php b/core/modules/views/tests/modules/views_test_data/lib/Drupal/views_test_data/Plugin/views/style/MappingTest.php index 19253b1..f7f67f0 100644 --- a/core/modules/views/tests/modules/views_test_data/lib/Drupal/views_test_data/Plugin/views/style/MappingTest.php +++ b/core/modules/views/tests/modules/views_test_data/lib/Drupal/views_test_data/Plugin/views/style/MappingTest.php @@ -22,7 +22,6 @@ * title = @Translation("Field mapping"), * help = @Translation("Maps specific fields to specific purposes."), * theme = "views_view_mapping_test", - * module = "views_test_data", * display_types = {"normal", "test"} * ) */ diff --git a/core/modules/views/tests/modules/views_test_data/lib/Drupal/views_test_data/Plugin/views/style/StyleTemplateTest.php b/core/modules/views/tests/modules/views_test_data/lib/Drupal/views_test_data/Plugin/views/style/StyleTemplateTest.php index ca4b224..b6fd43e 100644 --- a/core/modules/views/tests/modules/views_test_data/lib/Drupal/views_test_data/Plugin/views/style/StyleTemplateTest.php +++ b/core/modules/views/tests/modules/views_test_data/lib/Drupal/views_test_data/Plugin/views/style/StyleTemplateTest.php @@ -18,7 +18,6 @@ * * @ViewsStyle( * id = "test_template_style", - * module = "views_test_data", * title = @Translation("Test style template plugin"), * help = @Translation("Provides a generic style template test plugin."), * theme = "views_view_style_template_test", diff --git a/core/modules/views/views.module b/core/modules/views/views.module index 26a9dbb..3781956 100644 --- a/core/modules/views/views.module +++ b/core/modules/views/views.module @@ -234,7 +234,7 @@ function views_plugin_list() { $plugins[$key] = array( 'type' => $type, 'title' => check_plain($info[$name]['title']), - 'module' => check_plain($info[$name]['module']), + 'provider' => check_plain($info[$name]['provider']), 'views' => array(), ); }