Issue 2014: Add helper functions to documentItem class

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10737 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ucorina 2012-05-24 16:24:53 +00:00
parent 8b35151990
commit b797dc41dd

View file

@ -869,5 +869,42 @@
return $output->data;
}
/**
* @brief Returns the document's mid in order to construct SEO friendly URLs
*/
function getDocumentMid() {
$model = &getModel('module');
$module = $model->getModuleInfoByModuleSrl( this->get('module_srl'));
return $module->mid;
}
/**
* @brief Returns the document's type (document/page/wiki/board/etc)
*/
function getDocumentType() {
$model = &getModel('module');
$module = $model->getModuleInfoByModuleSrl( this->get('module_srl'));
return $module->module;
}
/**
* @brief Returns the document's alias
*/
function getDocumentAlias() {
$oDocumentModel = &getModel('document');
return $oDocumentModel->getAlias($this->document_srl);
}
/**
* @brief Returns the document's actual title (browser_title)
*/
function getModuleName() {
$model = &getModel('module');
$module = $model->getModuleInfoByModuleSrl($this->get('module_srl'));
return $module->browser_title;
}
}
?>