classes/help/OCSHelpMappingFile.inc.php

Go to the documentation of this file.
00001 <?php
00002 
00015 //$Id$
00016 
00017 import('help.HelpMappingFile');
00018 
00019 class OCSHelpMappingFile extends HelpMappingFile {
00023    function OCSHelpMappingFile() {
00024       parent::HelpMappingFile('help/help.xml');
00025    }
00026 
00030    function getTocFilename($tocId) {
00031       $help =& Help::getHelp();
00032       return sprintf('help/%s/%s.xml', $help->getLocale(), $tocId);
00033    }
00034 
00038    function getTopicFilename($topicId) {
00039       $help =& Help::getHelp();
00040       return sprintf('help/%s/%s.xml', $help->getLocale(), $topicId);
00041    }
00042 
00043 
00044    function getTopicIdForFilename($filename) {
00045       $parts = split('/', str_replace('\\', '/', $filename));
00046       array_shift($parts); // Knock off "help"
00047       array_shift($parts); // Knock off locale
00048       return substr(join('/', $parts), 0, -4); // Knock off .xml
00049    }
00050 
00051    function getSearchPath($locale = null) {
00052       if ($locale == '') {
00053          $help =& Help::getHelp();
00054          $locale = $help->getLocale();
00055       }
00056       return 'help' . DIRECTORY_SEPARATOR . $locale;
00057    }
00058 }
00059 
00060 ?>

Generated on 25 Jul 2013 for Open Conference Systems by  doxygen 1.4.7