diff --git a/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php b/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php index c5e50c7cdfd13d5a12c8120faae7fd2818c7fc34..68ce5582556d12bfa0d1121ec0ab4a8afc155525 100644 --- a/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php +++ b/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php @@ -1392,6 +1392,21 @@ public function getContextDefinition() { return $this->getPlugin('argument_validator')->getContextDefinition(); } + /** + * {@inheritdoc} + */ + public function adminSummary() { + // If an argument default has been set, show which argument default has been + // set. + if ($this->options['default_action'] === 'default') { + $plugin = $this->getPlugin(); + if ($plugin) { + return $this->t('Default: @plugin_title', ['@plugin_title' => $plugin->pluginTitle()]); + } + } + return ''; + } + } /** diff --git a/core/modules/views/tests/src/Functional/Plugin/ArgumentDefaultTest.php b/core/modules/views/tests/src/Functional/Plugin/ArgumentDefaultTest.php index aa3cc293757a4ac4f5cc9a9debea5d8d18edb95b..0628fbc7dc5f4cc50cd79dee4b0b5f17055240b2 100644 --- a/core/modules/views/tests/src/Functional/Plugin/ArgumentDefaultTest.php +++ b/core/modules/views/tests/src/Functional/Plugin/ArgumentDefaultTest.php @@ -73,6 +73,7 @@ public function testArgumentDefaultPlugin() { $id = $view->addHandler('default', 'argument', 'views_test_data', 'name', $options); $view->initHandlers(); $plugin = $view->argument[$id]->getPlugin('argument_default'); + $this->assertEquals('Default: Argument default test', $view->argument[$id]->adminSummary()); $this->assertInstanceOf(ArgumentDefaultTestPlugin::class, $plugin); // Check that the value of the default argument is as expected.