// by default - place content below existing content
const SUMMARY_BELOW = 1;
- // pace hook content above
+ // place hook content above
const SUMMARY_ABOVE = 2;
- // create your own summarys
+ // create your own summaries
const SUMMARY_REPLACE = 3;
static $_nullObject = NULL;
);
}
+ /**
+ * This hook is called after getting the content of the mail and before tokenizing it.
+ *
+ * @param array $templates
+ * Array fields include: html, text, subject
+ *
+ * @return mixed
+ */
+ public static function alterMailTemplates(&$templates) {
+ return self::singleton()->invoke(1, $templates,
+ self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject,
+ 'civicrm_alterMailTemplates'
+ );
+ }
+
/**
* This hook is called when rendering the Manage Case screen.
*
* the selector object. Allows you access to the context of the search
*
* @return mixed
- * modify the header and values object to pass the data u need
+ * modify the header and values object to pass the data you need
*/
public static function searchColumns($objectName, &$headers, &$rows, &$selector) {
return self::singleton()->invoke(4, $objectName, $headers, $rows, $selector,
self::singleton()
->invoke(2, $exception, $request, self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject, 'civicrm_unhandled_exception');
// == 4.4 ==
- //$event = new stdClass();
- //$event->exception = $exception;
- //CRM_Core_LegacyErrorHandler::handleException($event);
+ // $event = new stdClass();
+ // $event->exception = $exception;
+ // CRM_Core_LegacyErrorHandler::handleException($event);
// == 4.5+ ==
$event = new \Civi\Core\Event\UnhandledExceptionEvent($exception, self::$_nullObject);
* This hook fires whenever a record in a case changes.
*
* @param \Civi\CCase\Analyzer $analyzer
+ * A bundle of data about the case (such as the case and activity records).
*/
public static function caseChange(\Civi\CCase\Analyzer $analyzer) {
$event = new \Civi\CCase\Event\CaseChangeEvent($analyzer);
\Civi::service('dispatcher')->dispatch("hook_civicrm_caseChange", $event);
- return self::singleton()->invoke(1, $angularModules,
+ self::singleton()->invoke(1, $analyzer,
self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject,
'civicrm_caseChange'
);
/**
* This hook is called when a query string of the CSV Batch export is generated.
+ *
+ * @param string $query
+ *
+ * @return mixed
*/
public static function batchQuery(&$query) {
return self::singleton()->invoke(1, $query, self::$_nullObject,
/**
* This hook is called when the entries of the CSV Batch export are mapped.
+ *
+ * @param array $results
+ * @param array $items
+ *
+ * @return mixed
*/
public static function batchItems(&$results, &$items) {
return self::singleton()->invoke(2, $results, $items,