View source
<?php
$__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';
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.");
}
}
function asset_import_perm() {
return array(
'import asset files',
);
}
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;
}
function asset_import_theme() {
return array(
'asset_import_form' => array(
'arguments' => array(
'form' => NULL,
),
'file' => 'inc/asset_import.themes.inc',
),
);
}