function rrssb_node_view in Ridiculously Responsive Social Sharing Buttons 8.2
Same name and namespace in other branches
- 7.2 rrssb.module \rrssb_node_view()
- 7 rrssb.module \rrssb_node_view()
Implements hook_ENTITY_TYPE_view().
File
- ./
rrssb.module, line 418
Code
function rrssb_node_view(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display, $view_mode) {
if ($display
->getComponent('rrssb')) {
$type = NodeType::load($entity
->bundle());
if ($buttonSet = $type
->getThirdPartySetting('rrssb', 'button_set', '')) {
$build['rrssb'] = rrssb_get_buttons($buttonSet, $entity);
}
}
}