You are here

function sharerich_block_view_alter in Sharerich 8

Implements hook_block_view_alter().

Parameters

array $build:

\Drupal\Core\Block\BlockPluginInterface $block:

File

./sharerich.module, line 139
Contains sharerich.module..

Code

function sharerich_block_view_alter(array &$build, BlockPluginInterface $block) {
  if ($block
    ->getPluginId() == 'sharerich') {
    $build['#contextual_links']['sharerich'] = array(
      'route_parameters' => array(
        'sharerich' => $block
          ->getConfiguration()['sharerich_set'],
      ),
    );
  }
}