You are here

function rocket_chat_group_group_content_insert in Rocket.Chat 8.2

Implements hook_ENTITY_TYPE_insert().

Parameters

\Drupal\group\Entity\GroupContent $entity:

File

modules/rocket_chat_group/rocket_chat_group.module, line 17

Code

function rocket_chat_group_group_content_insert(Drupal\group\Entity\GroupContent $entity) {
  try {
    moduleHelper::ProcessGroupContentUpdate($entity, "insert");
  } catch (InvalidPluginDefinitionException $e) {
    Drupal::messenger()
      ->addError("Something went wrong, please notify the Site Admin");
    Drupal::logger("Rocket Chat : Base Module")
      ->critical($e
      ->getMessage());
  } catch (PluginNotFoundException $e) {
    Drupal::messenger()
      ->addError("Something went wrong, please notify the Site Admin");
    Drupal::logger("Rocket Chat : Base Module")
      ->critical($e
      ->getMessage());
  }
}