/** * Method post * * @param string $op * @param string $objectName * @param int $objectId * @param object $objectRef * @access public * @static */ public static function post($op, $objectName, $objectId, &$objectRef) { $extensionConfig = CRM_Civirules_Config::singleton(); if (!in_array($op, $extensionConfig->getValidTriggerOperations())) { return; } //find matching rules for this objectName and op $triggers = CRM_Civirules_BAO_Rule::findRulesByObjectNameAndOp($objectName, $op); foreach ($triggers as $trigger) { if ($trigger instanceof CRM_Civirules_Trigger_Post) { $trigger->triggerTrigger($op, $objectName, $objectId, $objectRef); } } }