mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 03:01:43 +09:00
Merge pull request #1520 from bjrambo/pr/notice-list-trigger
공지사항 리스트에도 트리거를 추가
This commit is contained in:
commit
d809219589
1 changed files with 24 additions and 2 deletions
|
|
@ -304,7 +304,26 @@ class documentModel extends document
|
||||||
$args = new stdClass();
|
$args = new stdClass();
|
||||||
$args->module_srl = $obj->module_srl;
|
$args->module_srl = $obj->module_srl;
|
||||||
$args->category_srl = $obj->category_srl ?? null;
|
$args->category_srl = $obj->category_srl ?? null;
|
||||||
$output = executeQueryArray('document.getNoticeList', $args, $columnList);
|
|
||||||
|
// Call trigger (before)
|
||||||
|
// This trigger can be used to set an alternative output using a different search method
|
||||||
|
unset($args->use_alternate_output);
|
||||||
|
$output = ModuleHandler::triggerCall('document.getNoticeList', 'before', $args);
|
||||||
|
if ($output instanceof BaseObject && !$output->toBool())
|
||||||
|
{
|
||||||
|
return $output;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If an alternate output is set, use it instead of running the default queries
|
||||||
|
if (isset($args->use_alternate_output) && $args->use_alternate_output instanceof BaseObject)
|
||||||
|
{
|
||||||
|
$output = $args->use_alternate_output;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$output = executeQueryArray('document.getNoticeList', $args, $columnList);
|
||||||
|
}
|
||||||
|
|
||||||
if(!$output->toBool() || !$result = $output->data)
|
if(!$output->toBool() || !$result = $output->data)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|
@ -322,7 +341,10 @@ class documentModel extends document
|
||||||
$output->data[$attribute->document_srl] = $GLOBALS['XE_DOCUMENT_LIST'][$attribute->document_srl];
|
$output->data[$attribute->document_srl] = $GLOBALS['XE_DOCUMENT_LIST'][$attribute->document_srl];
|
||||||
}
|
}
|
||||||
self::setToAllDocumentExtraVars();
|
self::setToAllDocumentExtraVars();
|
||||||
|
|
||||||
|
// Call trigger (after)
|
||||||
|
// This trigger can be used to modify search results
|
||||||
|
ModuleHandler::triggerCall('document.getNoticeList', 'after', $output);
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue