You are here

civicrm_cron.install in CiviCRM Cron 8

CiviCRM Cron installation code.

File

civicrm_cron.install
View source
<?php

/**
 * @file
 * CiviCRM Cron installation code.
 */

/**
 * Implements hook_install().
 */
function civicrm_cron_install() {
  \Drupal::service('civicrm')
    ->initialize();
  $config = \Drupal::configFactory()
    ->getEditable('civicrm_cron.settings');
  if (!$config
    ->get('sitekey') && defined('CIVICRM_SITE_KEY')) {
    $config
      ->set('sitekey', CIVICRM_SITE_KEY);
    $config
      ->save();
  }
}

Functions

Namesort descending Description
civicrm_cron_install Implements hook_install().