You are here

asset_import.module in Asset 6

Same filename in this branch
  1. 6 asset_import/asset_import.module
  2. 6 contrib/asset_import/asset_import.module
Same filename and directory in other branches
  1. 5 asset_import/asset_import.module

File

asset_import/asset_import.module
View source
<?php

/* This module is based largely on the image_import module that comes with the image module */
$__asset_import_path = drupal_get_path('module', 'asset_import');
require_once $__asset_import_path . '/inc/asset_import.routies.inc';
require_once $__asset_import_path . '/inc/asset_import.themes.inc';

/**
 * Implementation of hook_help().
 */
function asset_import_help($path, $arg) {
  switch ($path) {
    case 'admin/content/asset_import':
      $output = '<p>' . t("Import multiple files and save them as assets. The files will be moved from their location into the asset module's files directory. ") . t("Searching for files in %dirpath.", array(
        '%dirpath' => realpath(variable_get('asset_import_path', '')),
      )) . '</p>';
      return $output;
    case 'admin/settings/asset_import':
      return t("Configure the asset import module's settings.");
  }
}

/**
 * Implementation of hook_perm().
 */
function asset_import_perm() {
  return array(
    'import asset files',
  );
}

/**
 * Implementation of hook_menu().
 */
function asset_import_menu() {
  $items = array();
  $items['admin/content/asset_import'] = array(
    'title' => t('asset import'),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'asset_import_form',
    ),
    'access arguments' => array(
      'import asset files',
    ),
    'type' => MENU_NORMAL_ITEM,
    'description' => t('Import files from the filesystem.'),
    'file' => 'inc/asset_import.admin.inc',
  );
  $items['admin/settings/asset_import'] = array(
    'title' => t('asset import'),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'asset_import_admin_settings',
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'type' => MENU_NORMAL_ITEM,
    'description' => t('Change settings for the asset import module.'),
    'file' => 'inc/asset_import.admin.inc',
  );
  return $items;
}

/**
 * Implementation of hook_theme().
 */
function asset_import_theme() {
  return array(
    'asset_import_form' => array(
      'arguments' => array(
        'form' => NULL,
      ),
      'file' => 'inc/asset_import.themes.inc',
    ),
  );
}

Functions

Namesort descending Description
asset_import_help Implementation of hook_help().
asset_import_menu Implementation of hook_menu().
asset_import_perm Implementation of hook_perm().
asset_import_theme Implementation of hook_theme().