mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +09:00
Add to trigger for notice list
This commit is contained in:
parent
5d39fe938a
commit
dab51ba48e
1 changed files with 24 additions and 2 deletions
|
|
@ -304,7 +304,26 @@ class documentModel extends document
|
|||
$args = new stdClass();
|
||||
$args->module_srl = $obj->module_srl;
|
||||
$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($obj->use_alternate_output);
|
||||
$output = ModuleHandler::triggerCall('document.getNoticeList', 'before', $obj);
|
||||
if ($output instanceof BaseObject && !$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
|
||||
// If an alternate output is set, use it instead of running the default queries
|
||||
if (isset($obj->use_alternate_output) && $obj->use_alternate_output instanceof BaseObject)
|
||||
{
|
||||
$output = $obj->use_alternate_output;
|
||||
}
|
||||
else
|
||||
{
|
||||
$output = executeQueryArray('document.getNoticeList', $args, $columnList);
|
||||
}
|
||||
|
||||
if(!$output->toBool() || !$result = $output->data)
|
||||
{
|
||||
return;
|
||||
|
|
@ -322,7 +341,10 @@ class documentModel extends document
|
|||
$output->data[$attribute->document_srl] = $GLOBALS['XE_DOCUMENT_LIST'][$attribute->document_srl];
|
||||
}
|
||||
self::setToAllDocumentExtraVars();
|
||||
|
||||
|
||||
// Call trigger (after)
|
||||
// This trigger can be used to modify search results
|
||||
ModuleHandler::triggerCall('document.getNoticeList', 'after', $output);
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue