You are here

function google_calendar_block_block_configure in Google Calendar Block 7

Same name and namespace in other branches
  1. 7.2 google_calendar_block.module \google_calendar_block_block_configure()

Implements hook_block_configure().

File

./google_calendar_block.module, line 176
A module to provide simple Google Calendar blocks using the Google Data APIs.

Code

function google_calendar_block_block_configure($delta = 0) {
  if ($delta) {
    $config = google_calendar_block_block_get($delta);

    // Unserialize the calendar settings.
    $data = unserialize($config['data']);

    // Remove the serialized calendar settings.
    unset($config['data']);

    // Add the calendar settings to the block settings.
    $google_calendar_block = $config + $data;
  }
  else {
    $google_calendar_block = array();
  }
  return google_calendar_block_custom_block_form($google_calendar_block);
}