class Fixed in Drupal 10
Same name and namespace in other branches
- 8 core/modules/views/src/Plugin/views/argument_default/Fixed.php \Drupal\views\Plugin\views\argument_default\Fixed
- 9 core/modules/views/src/Plugin/views/argument_default/Fixed.php \Drupal\views\Plugin\views\argument_default\Fixed
The fixed argument default handler.
Plugin annotation
@ViewsArgumentDefault(
id = "fixed",
title = @Translation("Fixed")
)
Hierarchy
- class \Drupal\views\Plugin\views\argument_default\Fixed extends \Drupal\views\Plugin\views\argument_default\ArgumentDefaultPluginBase implements CacheableDependencyInterface
Expanded class hierarchy of Fixed
1 string reference to 'Fixed'
- views.argument_default.schema.yml in core/
modules/ views/ config/ schema/ views.argument_default.schema.yml - core/modules/views/config/schema/views.argument_default.schema.yml
File
- core/
modules/ views/ src/ Plugin/ views/ argument_default/ Fixed.php, line 19
Namespace
Drupal\views\Plugin\views\argument_defaultView source
class Fixed extends ArgumentDefaultPluginBase implements CacheableDependencyInterface {
/**
* {@inheritdoc}
*/
protected function defineOptions() {
$options = parent::defineOptions();
$options['argument'] = [
'default' => '',
];
return $options;
}
/**
* {@inheritdoc}
*/
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
parent::buildOptionsForm($form, $form_state);
$form['argument'] = [
'#type' => 'textfield',
'#title' => $this
->t('Fixed value'),
'#default_value' => $this->options['argument'],
];
}
/**
* {@inheritdoc}
*/
public function getArgument() {
return $this->options['argument'];
}
/**
* {@inheritdoc}
*/
public function getCacheMaxAge() {
return Cache::PERMANENT;
}
/**
* {@inheritdoc}
*/
public function getCacheContexts() {
return [];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CacheableDependencyInterface:: |
public | function | The cache tags associated with this object. | 17 |
Fixed:: |
public | function | ||
Fixed:: |
protected | function | ||
Fixed:: |
public | function | ||
Fixed:: |
public | function |
The cache contexts associated with this object. Overrides CacheableDependencyInterface:: |
|
Fixed:: |
public | function |
The maximum age for which this object may be cached. Overrides CacheableDependencyInterface:: |