mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 09:41:40 +09:00
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:
parent
8b35151990
commit
b797dc41dd
1 changed files with 37 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue