Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Dropbutton.php

function Dropbutton::render

Overrides FieldPluginBase::render

File

core/modules/views/src/Plugin/views/field/Dropbutton.php, line 19

Class

Dropbutton
Provides a handler that renders links as dropbutton.

Namespace

Drupal\views\Plugin\views\field

Code

public function render(ResultRow $values) {
    $links = $this->getLinks();
    if (!empty($links)) {
        return [
            '#type' => 'dropbutton',
            '#links' => $links,
        ];
    }
    else {
        return '';
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal