public function Dropbutton::render

Render the dropdown button.

Overrides FieldPluginBase::render

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/field/Dropbutton.php, line 24
Contains \Drupal\views\Plugin\views\field\Dropbutton.

Class

Dropbutton
Provides a handler that renders links as dropbutton.

Namespace

Drupal\views\Plugin\views\field

Code

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