-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathListener.php
More file actions
26 lines (23 loc) · 807 Bytes
/
Listener.php
File metadata and controls
26 lines (23 loc) · 807 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
namespace nick97\ResourceIconInSearchResults;
class Listener
{
public static function searchResultResourcePreRender(
\XF\Template\Templater $templater, &$type, &$template, array &$params
)
{
if (\XF::app()->style(\XF::visitor()->style_id)->getProperty('xfrmAllowIconsInSearchResults'))
{
$template = 'nick97_resource_icon_search_result_resource';
}
}
public static function searchResultResourceUpdatePreRender(
\XF\Template\Templater $templater, &$type, &$template, array &$params
)
{
if (\XF::app()->style(\XF::visitor()->style_id)->getProperty('xfrmAllowIconsInSearchResults'))
{
$template = 'nick97_resource_icon_search_result_resource_update';
}
}
}