function references_dialog_references_dialog_entity_admin_paths in References dialog 7
Implements hook_references_dialog_entity_admin_paths().
File
- ./
references_dialog.module, line 731 - This the main module file.
Code
function references_dialog_references_dialog_entity_admin_paths() {
// We define the add and edit page callbacks for core entities here.
$admin_paths = array(
'node' => array(
'add' => 'node/add/[bundle-sanitized]',
'edit' => 'node/[entity_id]/edit',
),
'taxonomy_term' => array(
'edit' => 'taxonomy/term/[entity_id]/edit',
'add' => 'admin/structure/taxonomy/[bundle]/add',
),
// Dealing with taxonomy vocabularies like this is kind of silly,
// and accessing them is a bit harder since their admin page is accessible
// through their machine name, so we leave it at just adding them for now.
'taxonomy_vocabulary' => array(
'add' => 'admin/structure/taxonomy/add',
),
'comment' => array(
'edit' => 'comment/[entity_id]/edit',
),
'user' => array(
'add' => 'admin/people/create',
'edit' => 'user/[entity_id]/edit',
),
);
// The media module adds an edit callback for media as well.
// Note: this will probably not work until file_entity provides an access
// API, see http://drupal.org/node/1227706
if (module_exists('media')) {
$admin_paths['file'] = array(
'edit' => 'media/[entity_id]/edit',
);
}
// Bean provides add and edit paths for custom entities.
if (module_exists('bean')) {
$admin_paths['bean'] = array(
'add' => 'block/add/[bundle-sanitized]',
'edit' => 'block/[entity_id]/edit',
);
}
return $admin_paths;
}