class Dropbutton
Same name in this branch
- 9 core/lib/Drupal/Core/Render/Element/Dropbutton.php \Drupal\Core\Render\Element\Dropbutton
Same name and namespace in other branches
- 11.x core/modules/views/src/Plugin/views/field/Dropbutton.php \Drupal\views\Plugin\views\field\Dropbutton
- 11.x core/lib/Drupal/Core/Render/Element/Dropbutton.php \Drupal\Core\Render\Element\Dropbutton
Provides a handler that renders links as dropbutton.
Plugin annotation
@ViewsField("dropbutton");
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\HandlerBase extends \Drupal\views\Plugin\views\ViewsHandlerInterface implements \Drupal\views\Plugin\views\PluginBase
- class \Drupal\views\Plugin\views\field\FieldPluginBase extends \Drupal\views\Plugin\views\field\FieldHandlerInterface implements \Drupal\views\Plugin\views\HandlerBase
- class \Drupal\views\Plugin\views\field\Links implements \Drupal\views\Plugin\views\field\FieldPluginBase
- class \Drupal\views\Plugin\views\field\Dropbutton implements \Drupal\views\Plugin\views\field\Links
- class \Drupal\views\Plugin\views\field\Links implements \Drupal\views\Plugin\views\field\FieldPluginBase
- class \Drupal\views\Plugin\views\field\FieldPluginBase extends \Drupal\views\Plugin\views\field\FieldHandlerInterface implements \Drupal\views\Plugin\views\HandlerBase
- class \Drupal\views\Plugin\views\HandlerBase extends \Drupal\views\Plugin\views\ViewsHandlerInterface 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 Dropbutton
Related topics
10 string references to 'Dropbutton'
- claro_preprocess_views_ui_display_tab_bucket in core/
themes/ claro/ claro.theme - Implements hook_preprocess_HOOK() for views_ui_display_tab_bucket.
- Dropbutton::preRenderDropbutton in core/
lib/ Drupal/ Core/ Render/ Element/ Dropbutton.php - Pre-render callback: Attaches the dropbutton library and required markup.
- FieldDropbuttonTest::testDropbuttonMarkupShouldNotLeakBetweenRows in core/
modules/ views/ tests/ src/ Kernel/ Handler/ FieldDropbuttonTest.php - Tests that dropbutton markup doesn't leak between rows.
- views.view.content.yml in core/
modules/ node/ config/ optional/ views.view.content.yml - core/modules/node/config/optional/views.view.content.yml
- views.view.test_content_ajax.yml in core/
modules/ views/ tests/ modules/ views_test_config/ test_views/ views.view.test_content_ajax.yml - core/modules/views/tests/modules/views_test_config/test_views/views.view.test_content_ajax.yml
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 '';
}
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.