refactor Event Listeners

This commit is contained in:
Eric Espie
2022-06-01 14:29:43 +02:00
parent 35e1f080b8
commit e77f21a0b5
9 changed files with 136 additions and 119 deletions

View File

@@ -1588,18 +1588,18 @@ public function PrefillSearchForm(&$aContextParam)
</field>
</fields>
<event_listeners>
<listener id="OnCheckToWrite">
<listener id="OnSLACheckToWrite">
<event>EVENT_SERVICE_DB_CHECK_TO_WRITE</event>
<callback>OnCheckToWrite</callback>
<callback>OnSLACheckToWrite</callback>
<priority>0</priority>
</listener>
</event_listeners>
<methods>
<method id="OnCheckToWrite">
<method id="OnSLACheckToWrite">
<static>false</static>
<access>public</access>
<code><![CDATA[
public function OnCheckToWrite(Combodo\iTop\Service\EventData $oEventData)
public function OnSLACheckToWrite(Combodo\iTop\Service\EventData $oEventData)
{
$aCustomerContracts = $this->Get("customercontracts_list");
foreach ($aCustomerContracts as $sAttCode => $oCustomerContracts)