class ViewsBadge in Link Badges 8
Same name in this branch
- 8 src/Plugin/LinkBadge/ViewsBadge.php \Drupal\link_badges\Plugin\LinkBadge\ViewsBadge
- 8 src/Plugin/Derivative/ViewsBadge.php \Drupal\link_badges\Plugin\Derivative\ViewsBadge
Class ViewsBadge
Plugin annotation
@LinkBadge(
id = "views_badge",
deriver = "Drupal\link_badges\Plugin\Derivative\ViewsBadge"
)
Hierarchy
- class \Drupal\link_badges\LinkBadgeBase implements LinkBadgeInterface
- class \Drupal\link_badges\Plugin\LinkBadge\ViewsBadge
Expanded class hierarchy of ViewsBadge
File
- src/
Plugin/ LinkBadge/ ViewsBadge.php, line 16
Namespace
Drupal\link_badges\Plugin\LinkBadgeView source
class ViewsBadge extends LinkBadgeBase {
public $name;
public $display_id;
/**
* {@inheritdoc}
*/
public function getBadgeValue() {
$result = views_embed_view($this->name, $this->display_id);
return drupal_render($result);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
LinkBadgeBase:: |
public | function | ||
ViewsBadge:: |
public | property | ||
ViewsBadge:: |
public | property | ||
ViewsBadge:: |
public | function |
Overrides LinkBadgeBase:: |