RSS Feed/News criteria_template_data event lacks context

Status
Not open for further replies.

ENXF NET

Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Nov 13, 2018
Messages
28,640
Points
823

Reputation:

When listening to the criteria_template_data event, there is no way to obtain any information about the context. This means that any database queries for data that is only relevant to a certain criteria type, such as UserCriteria, will get duplicated for PageCriteria and any custom criteria handlers we add.

The extension should pass $this into the args, f.ex. $this->app->fire('criteria_template_data', [&$templateData, $this]); so we can limit database...

Read more

Continue reading...
 
Status
Not open for further replies.
Top