getName())), $this->getDisplayName(), true ); $templateMgr->assign('pageHierarchy', array_merge($pageCrumbs, $crumbs)); } /** * Display the import/export plugin UI. * @param $args Array The array of arguments the user supplied. */ function display(&$args) { $templateManager =& TemplateManager::getManager(); $templateManager->register_function('plugin_url', array(&$this, 'smartyPluginUrl')); } /** * Execute import/export tasks using the command-line interface. * @param $scriptName The name of the command-line script (displayed as usage info) * @param $args Parameters to the plugin */ function executeCLI($scriptName, &$args) { $this->usage(); // Implemented by subclasses } /** * Display the command-line usage information */ function usage($scriptName) { // Implemented by subclasses } /** * Display verbs for the management interface. */ function getManagementVerbs() { return array( array( 'importexport', Locale::translate('manager.importExport') ) ); } /** * Perform management functions */ function manage($verb, $args) { if ($verb === 'importexport') { Request::redirect(null, null, 'manager', 'importexport', array('plugin', $this->getName())); } return false; } /** * Extend the {url ...} smarty to support import/export plugins. */ function smartyPluginUrl($params, &$smarty) { $path = array('plugin', $this->getName()); if (is_array($params['path'])) { $params['path'] = array_merge($path, $params['path']); } elseif (!empty($params['path'])) { $params['path'] = array_merge($path, array($params['path'])); } else { $params['path'] = $path; } return $smarty->smartyUrl($params, $smarty); } } ?>