class ArgumentDefaultTest in Drupal 10
Same name in this branch
- 10 core/modules/views/tests/src/Functional/Plugin/ArgumentDefaultTest.php \Drupal\Tests\views\Functional\Plugin\ArgumentDefaultTest
- 10 core/modules/user/tests/src/Kernel/Views/ArgumentDefaultTest.php \Drupal\Tests\user\Kernel\Views\ArgumentDefaultTest
- 10 core/modules/views/tests/modules/views_test_data/src/Plugin/views/argument_default/ArgumentDefaultTest.php \Drupal\views_test_data\Plugin\views\argument_default\ArgumentDefaultTest
Same name and namespace in other branches
- 8 core/modules/views/tests/modules/views_test_data/src/Plugin/views/argument_default/ArgumentDefaultTest.php \Drupal\views_test_data\Plugin\views\argument_default\ArgumentDefaultTest
- 9 core/modules/views/tests/modules/views_test_data/src/Plugin/views/argument_default/ArgumentDefaultTest.php \Drupal\views_test_data\Plugin\views\argument_default\ArgumentDefaultTest
Defines an argument default test plugin.
Plugin annotation
@ViewsArgumentDefault(
id = "argument_default_test",
title = @Translation("Argument default test")
)
Hierarchy
- class \Drupal\views_test_data\Plugin\views\argument_default\ArgumentDefaultTest extends \Drupal\views\Plugin\views\argument_default\ArgumentDefaultPluginBase
Expanded class hierarchy of ArgumentDefaultTest
1 file declares its use of ArgumentDefaultTest
- ArgumentDefaultTest.php in core/
modules/ views/ tests/ src/ Functional/ Plugin/ ArgumentDefaultTest.php
3 string references to 'ArgumentDefaultTest'
- ArgumentDefaultTest::calculateDependencies in core/
modules/ views/ tests/ modules/ views_test_data/ src/ Plugin/ views/ argument_default/ ArgumentDefaultTest.php - ViewEntityDependenciesTest::testGetDependencies in core/
modules/ views/ tests/ src/ Kernel/ Entity/ ViewEntityDependenciesTest.php - Tests the getDependencies method.
- views.view.test_argument_dependency.yml in core/
modules/ views/ tests/ modules/ views_test_config/ test_views/ views.view.test_argument_dependency.yml - core/modules/views/tests/modules/views_test_config/test_views/views.view.test_argument_dependency.yml
File
- core/
modules/ views/ tests/ modules/ views_test_data/ src/ Plugin/ views/ argument_default/ ArgumentDefaultTest.php, line 15
Namespace
Drupal\views_test_data\Plugin\views\argument_defaultView source
class ArgumentDefaultTest extends ArgumentDefaultPluginBase {
/**
* {@inheritdoc}
*/
protected function defineOptions() {
$options = parent::defineOptions();
$options['value'] = [
'default' => '',
];
return $options;
}
/**
* {@inheritdoc}
*/
public function getArgument() {
$this->view->element['#cache']['tags'][] = 'example_tag';
return $this->options['value'];
}
/**
* {@inheritdoc}
*/
public function calculateDependencies() {
return [
'content' => [
'ArgumentDefaultTest',
],
];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ArgumentDefaultTest:: |
public | function | ||
ArgumentDefaultTest:: |
protected | function | ||
ArgumentDefaultTest:: |
public | function |