<?php

/**
 * @file
 * Contains Drupal\group_core_comments\group_core_comments.module.
 */

/**
 * Implements hook_entity_type_alter().
 */
function group_core_comments_entity_type_alter(array &$entity_types) {
  if (isset($entity_types['comment'])) {
    $class = 'Drupal\group_core_comments\GroupCommentAccessControlHandler';
    $entity_types['comment']->setAccessClass($class);
  }
}

/**
 * Implements hook_theme().
 */
function group_core_comments_theme($existing, $type, $theme, $path) {
  return [
    'comments_join_group' => [
      'variables' => [
        'description' => NULL,
        'group_info' => NULL,
        'action' => NULL,
      ],
    ],
  ];
}
