Dropbutton.php in Zircon Profile 8.0
Same filename in this branch
Same filename and directory in other branches
Namespace
Drupal\views\Plugin\views\fieldFile
core/modules/views/src/Plugin/views/field/Dropbutton.phpView source
<?php
/**
* @file
* Contains \Drupal\views\Plugin\views\field\Dropbutton.
*/
namespace Drupal\views\Plugin\views\field;
use Drupal\views\ResultRow;
/**
* Provides a handler that renders links as dropbutton.
*
* @ingroup views_field_handlers
*
* @ViewsField("dropbutton")
*/
class Dropbutton extends Links {
/**
* {@inheritdoc}
*/
public function render(ResultRow $values) {
$links = $this
->getLinks();
if (!empty($links)) {
return array(
'#type' => 'dropbutton',
'#links' => $links,
);
}
else {
return '';
}
}
}
Classes
Name | Description |
---|---|
Dropbutton | Provides a handler that renders links as dropbutton. |