mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 18:21:39 +09:00
Use Rhymix action, not standalone .xml.php file, to load document category info
This commit is contained in:
parent
a609478db4
commit
34f05b08de
4 changed files with 55 additions and 34 deletions
|
|
@ -964,6 +964,27 @@ class DocumentModel extends Document
|
|||
$this->add('categories', $output);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get category list in tree format
|
||||
*/
|
||||
public function getDocumentCategoryTree()
|
||||
{
|
||||
$module_srl = Context::get('module_srl');
|
||||
if ($module_srl <= 0)
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\TargetNotFound;
|
||||
}
|
||||
$filename = self::getCategoryPhpFile($module_srl);
|
||||
if (!$filename)
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\TargetNotFound;
|
||||
}
|
||||
|
||||
include $filename;
|
||||
|
||||
$this->add('categories', $menu->list ?? []);
|
||||
}
|
||||
|
||||
/**
|
||||
* Wanted to set document information
|
||||
* @return object
|
||||
|
|
@ -1003,10 +1024,6 @@ class DocumentModel extends Document
|
|||
*/
|
||||
public function getCategoryHTML($module_srl)
|
||||
{
|
||||
$category_xml_file = self::getCategoryXmlFile($module_srl);
|
||||
|
||||
Context::set('category_xml_file', $category_xml_file);
|
||||
|
||||
Context::loadJavascriptPlugin('ui.tree');
|
||||
|
||||
// Get a list of member groups
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue