function block_content_permissions_views_pre_build in Block Content Permissions 8
Implements hook_views_pre_build().
File
- ./
block_content_permissions.module, line 71 - Block content permissions module.
Code
function block_content_permissions_views_pre_build(ViewExecutable $view) {
switch ($view->storage
->id()) {
// On the block content listing page, the "Block Description" column has
// "edit" links that always show regardless of permission. Remove the links
// to force use of the managed "Operations" column links.
case 'block_content':
if (!empty($view->field['info']->options['settings']['link_to_entity'])) {
$view->field['info']->options['settings']['link_to_entity'] = FALSE;
}
break;
}
}