function file_entity_pathauto in File Entity (fieldable files) 7.2
Same name and namespace in other branches
- 7.3 file_entity.pathauto.inc \file_entity_pathauto()
Implements hook_pathauto().
File
- ./
file_entity.pathauto.inc, line 22 - Pathauto integration for files.
Code
function file_entity_pathauto($op) {
// Allow Pathauto Entity settings to override File Entity's pathauto.
if (module_exists('pathauto_entity')) {
return;
}
switch ($op) {
case 'settings':
$settings = array();
$settings['module'] = 'file';
$settings['token_type'] = 'file';
$settings['groupheader'] = t('File paths');
$settings['patterndescr'] = t('Default path pattern (applies to all file types with blank patterns below)');
$settings['patterndefault'] = '';
$settings['batch_update_callback'] = 'file_entity_pathauto_bulk_update_batch_process';
$settings['batch_file'] = drupal_get_path('module', 'file_entity') . '/file_entity.pathauto.inc';
foreach (file_type_get_enabled_types() as $file_type => $type) {
$settings['patternitems'][$file_type] = t('Pattern for all @file_type paths.', array(
'@file_type' => $type->label,
));
}
return (object) $settings;
default:
break;
}
}