You are here

cms_events.install in Glazed CMS Events 7

Same filename and directory in other branches
  1. 8 cms_events.install

Install, update and uninstall functions for the CMS Events module.

File

cms_events.install
View source
<?php

/**
 * @file
 * Install, update and uninstall functions for the CMS Events module.
 */

/**
 * Implements hook_install().
 */
function cms_events_install() {

  // Enable some standard blocks.
  $default_theme = variable_get('theme_default', 'bartik');
  $blocks = array(
    array(
      'cache' => '-1',
      'delta' => 'cms_events-monthly_archive',
      'module' => 'views',
      'pages' => "events\nevents/*\nevents-archive\nevents-archive/*",
      'region' => 'sidebar_second',
      'status' => '1',
      'theme' => $default_theme,
      'title' => 'Events Archive',
      'visibility' => '1',
      'weight' => '0',
    ),
  );
  foreach ($blocks as $block) {
    db_merge('block')
      ->key(array(
      'module' => $block['module'],
      'delta' => $block['delta'],
      'theme' => $default_theme,
    ))
      ->fields($block)
      ->execute();
  }
}

Functions

Namesort descending Description
cms_events_install Implements hook_install().