class Fixed
Same name and namespace in other branches
- 11.x 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\Component\Plugin\PluginBase extends \Drupal\Component\Plugin\PluginInspectionInterface, \Drupal\Component\Plugin\DerivativeInspectionInterface
- class \Drupal\Core\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait implements \Drupal\Component\Plugin\PluginBase
- class \Drupal\views\Plugin\views\PluginBase extends \Drupal\Core\Plugin\ContainerFactoryPluginInterface, \Drupal\views\Plugin\views\ViewsPluginInterface, \Drupal\Component\Plugin\DependentPluginInterface, \Drupal\Core\Security\TrustedCallbackInterface implements \Drupal\Core\Plugin\PluginBase
- class \Drupal\views\Plugin\views\argument_default\ArgumentDefaultPluginBase implements \Drupal\views\Plugin\views\PluginBase
- class \Drupal\views\Plugin\views\argument_default\Fixed extends \Drupal\Core\Cache\CacheableDependencyInterface implements \Drupal\views\Plugin\views\argument_default\ArgumentDefaultPluginBase
- class \Drupal\views\Plugin\views\argument_default\ArgumentDefaultPluginBase implements \Drupal\views\Plugin\views\PluginBase
- class \Drupal\views\Plugin\views\PluginBase extends \Drupal\Core\Plugin\ContainerFactoryPluginInterface, \Drupal\views\Plugin\views\ViewsPluginInterface, \Drupal\Component\Plugin\DependentPluginInterface, \Drupal\Core\Security\TrustedCallbackInterface implements \Drupal\Core\Plugin\PluginBase
- class \Drupal\Core\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait implements \Drupal\Component\Plugin\PluginBase
Expanded class hierarchy of Fixed
Related topics
53 string references to 'Fixed'
- ArgumentPluginBase::defineOptions in core/
modules/ views/ src/ Plugin/ views/ argument/ ArgumentPluginBase.php - ViewElementTest::testViewElement in core/
modules/ views/ tests/ src/ Functional/ ViewElementTest.php - Tests the rendered output and form output of a view element.
- ViewElementTest::testViewElement in core/
modules/ views/ tests/ src/ Kernel/ ViewElementTest.php - Tests the rendered output and form output of a view element.
- ViewElementTest::testViewElementEmbed in core/
modules/ views/ tests/ src/ Kernel/ ViewElementTest.php - Tests the rendered output and form output of the "embed" display plugin.
- ViewElementTest::testViewElementEmbed in core/
modules/ views/ tests/ src/ Functional/ ViewElementTest.php - Tests the rendered output and form output of the "embed" display plugin.
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 [];
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.