Commit e8f72808 authored by speedprogs_de's avatar speedprogs_de

implemented functionality of the documentation service using ter_doc extension

git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/terfe/branches/ter_fe2@51655 735d13b6-9817-0410-8766-e36946ffe9aa
parent 753a6a44
......@@ -28,6 +28,25 @@
*/
class Tx_TerFe2_Service_Documentation implements t3lib_Singleton {
/**
* @var tx_terdoc_api
*/
protected $terDocApi;
/**
* Initialize the service
*
* @return void
*/
public function __construct() {
if (t3lib_extMgm::isLoaded('ter_doc')) {
require_once(t3lib_extMgm::extPath('ter_doc') . 'class.tx_terdoc_api.php');
$this->terDocApi = tx_terdoc_api::getInstance();
}
}
/**
* Get documentation url
*
......@@ -40,7 +59,10 @@
throw new Exception('Extension key and version string are required to build a documentation url');
}
// TODO: Get url from ter_doc extension
if (!empty($this->terDocApi)) {
return $this->terDocApi->getDocumentationLink($extension, $version);
}
return '';
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment