You are here

imagecache_reflect.module in ImageCache Reflect 8

Same filename and directory in other branches
  1. 7 imagecache_reflect.module

Module file for imagecache_reflect

File

imagecache_reflect.module
View source
<?php

/**
 * @file
 * Module file for imagecache_reflect
 */

/**
 * Implements hook_help().
 */
function imagecache_reflect_help($path) {
  switch ($path) {
    case 'admin/help#imagecache_reflect':

      // Help text for the admin section, using the module name in the path.
      return t("This is help text created in the imagecache reflect module.");
  }
}

/**
 * Implements hook_theme().
 */
function imagecache_reflect_theme() {
  return array(
    'imagecache_reflect_summary' => array(
      'variables' => array(
        'data' => NULL,
      ),
    ),
  );
}

/**
 * Formats a summary of the reflection-like effect.
 * 
 * @param array $variables
 *   An associative array containing:
 *   - data: The current configuration for this reflection-like effect.
 * 
 * @ingroup themeable
 */
function theme_imagecache_reflect_summary($variables) {
  $data = $variables['data'];
  return t('Background Color: @color, Preserve transparency: @preserve, Position: @position, Size: @size', array(
    '@color' => !empty($data['bgcolor']) ? $data['bgcolor'] : t('none'),
    '@preserve' => $data['transparency'] ? t('Yes') : t('No'),
    '@position' => $data['position'],
    '@size' => $data['size'],
  ));
}

Functions

Namesort descending Description
imagecache_reflect_help Implements hook_help().
imagecache_reflect_theme Implements hook_theme().
theme_imagecache_reflect_summary Formats a summary of the reflection-like effect.