Skip to content
Snippets Groups Projects
Commit c8867028 authored by Earl Miles's avatar Earl Miles
Browse files

#455024: Check for taxonomy.module enabled before allowing the term_view task to exist.

parent d9452c1d
No related branches found
No related tags found
No related merge requests found
...@@ -15,44 +15,46 @@ ...@@ -15,44 +15,46 @@
* more information. * more information.
*/ */
function delegator_term_view_delegator_tasks() { function delegator_term_view_delegator_tasks() {
return array( if (module_exists('taxonomy')) {
// This is a 'page' task and will fall under the page admin UI return array(
'task type' => 'page', // This is a 'page' task and will fall under the page admin UI
'task type' => 'page',
'title' => t('Taxonomy term view'),
'description' => t('Control what handles the job of displaying a term at taxonomy/term/%term.'), 'title' => t('Taxonomy term view'),
'admin title' => 'Taxonomy term view', // translated by menu system 'description' => t('Control what handles the job of displaying a term at taxonomy/term/%term.'),
'admin description' => 'Overrides for the built in taxonomy term handler at <em>taxonomy/term/%term</em>.', 'admin title' => 'Taxonomy term view', // translated by menu system
'admin path' => 'taxonomy/term/%term', 'admin description' => 'Overrides for the built in taxonomy term handler at <em>taxonomy/term/%term</em>.',
'admin path' => 'taxonomy/term/%term',
// Menu hooks so that we can alter the term/%term menu entry to point to us.
'hook menu' => 'delegator_term_view_menu', // Menu hooks so that we can alter the term/%term menu entry to point to us.
'hook menu alter' => 'delegator_term_view_menu_alter', 'hook menu' => 'delegator_term_view_menu',
'hook menu alter' => 'delegator_term_view_menu_alter',
// Provide a setting to the primary settings UI for Panels
'admin settings' => 'delegator_term_view_admin_settings', // Provide a setting to the primary settings UI for Panels
'admin settings' => 'delegator_term_view_admin_settings',
// Callback to add items to the delegator task administration form:
'task admin' => 'delegator_term_view_task_admin', // Callback to add items to the delegator task administration form:
'task admin' => 'delegator_term_view_task_admin',
// This is task uses 'context' handlers and must implement these to give the
// handler data it needs. // This is task uses 'context' handlers and must implement these to give the
'handler type' => 'context', // handler data it needs.
'get arguments' => 'delegator_term_view_get_arguments', 'handler type' => 'context',
'get context placeholders' => 'delegator_term_view_get_contexts', 'get arguments' => 'delegator_term_view_get_arguments',
'get context placeholders' => 'delegator_term_view_get_contexts',
// Allow additional operations
'operations' => array( // Allow additional operations
array( 'operations' => array(
'title' => t('Task handlers'), array(
'href' => "admin/build/delegator/term_view", 'title' => t('Task handlers'),
), 'href' => "admin/build/delegator/term_view",
array( ),
'title' => t('Settings'), array(
'href' => "admin/build/delegator/term_view/settings", 'title' => t('Settings'),
'href' => "admin/build/delegator/term_view/settings",
),
), ),
), );
); }
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment