<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.7 |
+ | CiviCRM version 5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2017 |
+ | Copyright CiviCRM LLC (c) 2004-2018 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CiviCRM_Hook
- * @copyright CiviCRM LLC (c) 2004-2017
+ * @copyright CiviCRM LLC (c) 2004-2018
*/
abstract class CRM_Utils_Hook {
);
}
+ /**
+ * Alter redirect.
+ *
+ * This hook is called when the browser is being re-directed and allows the url
+ * to be altered.
+ *
+ * @param \Psr\Http\Message\UriInterface $url
+ * @param array $context
+ * Additional information about context
+ * - output - if this is 'json' then it will return json.
+ *
+ * @return null
+ * the return value is ignored
+ */
+ public static function alterRedirect(&$url, &$context) {
+ return self::singleton()->invoke(array('url', 'context'), $url,
+ $context, self::$_nullObject,
+ self::$_nullObject, self::$_nullObject, self::$_nullObject,
+ 'civicrm_alterRedirect'
+ );
+ }
+
/**
* @param $varType
* @param $var
// are expected to be called externally.
// It's really really unlikely anyone uses this - but let's add deprecations for a couple
// of releases first.
- Civi::log()->warning('Deprecated function CRM_Utils_Hook::alterMail, use CRM_Utils_Hook::alterMailer', array('civi.tag' => 'deprecated'));
+ CRM_Core_Error::deprecatedFunctionWarning('CRM_Utils_Hook::alterMailer');
return CRM_Utils_Hook::alterMailer($mailer, $driver, $params);
}