page_manager_redirect.module in Page manager redirect 7
Same filename and directory in other branches
Expose ourselves to Page manager, in a good way.
File
page_manager_redirect.moduleView source
<?php
/**
* @file Expose ourselves to Page manager, in a good way.
*/
define('PAGE_MANAGER_REQUIRED_CTOOLS_API', '2.0-alpha');
/**
* Implements hook_ctools_plugin_directory() to let the system know
* we implement page manager task handlers.
*/
function page_manager_redirect_ctools_plugin_directory($module, $plugin) {
// Safety: go away if CTools is not at an appropriate version.
if (!module_invoke('ctools', 'api_version', PAGE_MANAGER_REQUIRED_CTOOLS_API)) {
return;
}
if ($module == 'page_manager') {
return 'plugins/' . $plugin;
}
}
/**
* page manager redirect path helper function.
*/
function page_manager_redirect_get_path($file, $base_path = FALSE, $module = 'page_manager_redirect') {
$output = $base_path ? base_path() : '';
return $output . drupal_get_path('module', $module) . '/' . $file;
}
Functions
Name![]() |
Description |
---|---|
page_manager_redirect_ctools_plugin_directory | Implements hook_ctools_plugin_directory() to let the system know we implement page manager task handlers. |
page_manager_redirect_get_path | page manager redirect path helper function. |
Constants
Name![]() |
Description |
---|---|
PAGE_MANAGER_REQUIRED_CTOOLS_API | @file Expose ourselves to Page manager, in a good way. |