You are here

function comment_perm_entity_reference_selection_alter in Comment Permissions 8

Implements hook_entity_reference_selection_alter().

File

./comment_perm.module, line 64
Control commenting permissions per comment type.

Code

function comment_perm_entity_reference_selection_alter(array &$selection) {
  if (!empty($selection['default:comment'])) {
    $selection['default:comment']['class'] = 'Drupal\\comment_perm\\Plugin\\EntityReferenceSelection\\CommentSelection';
  }
}