class Dropbutton in Drupal 10
Same name in this branch
- 10 core/lib/Drupal/Core/Render/Element/Dropbutton.php \Drupal\Core\Render\Element\Dropbutton
- 10 core/modules/views/src/Plugin/views/field/Dropbutton.php \Drupal\views\Plugin\views\field\Dropbutton
Same name and namespace in other branches
- 8 core/modules/views/src/Plugin/views/field/Dropbutton.php \Drupal\views\Plugin\views\field\Dropbutton
- 9 core/modules/views/src/Plugin/views/field/Dropbutton.php \Drupal\views\Plugin\views\field\Dropbutton
Provides a handler that renders links as dropbutton.
Plugin annotation
@ViewsField("dropbutton");
Hierarchy
- class \Drupal\views\Plugin\views\field\Links extends \Drupal\views\Plugin\views\field\FieldPluginBase
- class \Drupal\views\Plugin\views\field\Dropbutton
Expanded class hierarchy of Dropbutton
2 string references to 'Dropbutton'
- views.view.test_dropbutton.yml in core/
modules/ views/ tests/ modules/ views_test_config/ test_views/ views.view.test_dropbutton.yml - core/modules/views/tests/modules/views_test_config/test_views/views.view.test_dropbutton.yml
- views_views_data in core/
modules/ views/ views.views.inc - Implements hook_views_data().
File
- core/
modules/ views/ src/ Plugin/ views/ field/ Dropbutton.php, line 14
Namespace
Drupal\views\Plugin\views\fieldView source
class Dropbutton extends Links {
/**
* {@inheritdoc}
*/
public function render(ResultRow $values) {
$links = $this
->getLinks();
if (!empty($links)) {
return [
'#type' => 'dropbutton',
'#links' => $links,
];
}
else {
return '';
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Dropbutton:: |
public | function | ||
Links:: |
public | function | ||
Links:: |
public | function | ||
Links:: |
protected | function | Gets the list of links used by this field. | |
Links:: |
public | function | ||
Links:: |
public | function |