Line 4: Line 4:
  
 
Allowing people to do additional actions with the information submitted by the Form.
 
Allowing people to do additional actions with the information submitted by the Form.
 
<table style="text-align:left; border: 1px solid #a2a9b1; border-collapse: collapse; margin: auto; clear: both;" cellpadding="5">
 
<tbody><tr>
 
<th colspan="2" style="background-color: #eaecf0; font-size: 120%; text-align: center; padding: .5em;">BeforeCreateEchoEvent</th>
 
</tr>
 
<tr>
 
<td colspan="2" style="text-align:center; margin:0.3em"><i>Available from version&nbsp;??? (<a href="https://gerrit.wikimedia.org/r/29436" class="extiw" title="gerrit:29436">Gerrit change 29436</a>)</i><br>Allows registration of custom Echo events<br></td>
 
</tr>
 
<tr>
 
<td><b>Define function:</b></td>
 
<td><div class="mw-highlight mw-highlight-lang-php mw-content-ltr" dir="ltr"><pre><span></span><span class="k">public</span> <span class="k">static</span> <span class="k">function</span> <span class="nf">onBeforeCreateEchoEvent</span><span class="p">(</span> <span class="o">&amp;</span><span class="nv">$echoNotifications</span><span class="p">,</span> <span class="o">&amp;</span><span class="nv">$echoNotificationCategories</span><span class="p">,</span> <span class="o">&amp;</span><span class="nv">$echoNotificationIcons</span> <span class="p">)</span> <span class="p">{</span> <span class="o">...</span> <span class="p">}</span>
 
</pre></div></td>
 
</tr>
 
<tr>
 
<td><b>Attach hook:</b></td>
 
<td><div class="mw-highlight mw-highlight-lang-php mw-content-ltr" dir="ltr"><pre><span></span><span class="nv">$wgHooks</span><span class="p">[</span><span class="s1">'BeforeCreateEchoEvent'</span><span class="p">][]</span> <span class="o">=</span> <span class="s1">'MyExtensionHooks::onBeforeCreateEchoEvent'</span><span class="p">;</span>
 
</pre></div></td>
 
</tr>
 
<tr>
 
<td style="padding:0.3em"><b>Called from:</b></td><td><b>File(s):</b> <a href="/wiki/Special:MyLanguage/Extension:Echo" title="Special:MyLanguage/Extension:Echo">Echo</a> / includes/EchoHooks.php<br><b>Function(s):</b> <span class="plainlinks"><a class="external text" href="https://doc.wikimedia.org/mediawiki-core/master/php/classEchoHooks.html">initEchoExtension</a></span></td>
 
</tr>
 
</tbody></table>
 

Revision as of 13:43, 24 May 2022

FFAfterFormHandling hook

When FlexForm is finished processing a submit form and just before it will set notification and return to the user, this Hook will run.

Allowing people to do additional actions with the information submitted by the Form.

ws-page-props