You are here

group_core_comments.module in Open Social 10.2.x

Contains Drupal\group_core_comments\group_core_comments.module.

File

modules/custom/group_core_comments/group_core_comments.module
View source
<?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,
      ],
    ],
  ];
}